Solved

RadGrid cell format

Posted on 2010-11-09
2
994 Views
Last Modified: 2012-05-10
In my attached code the forecolor part is working fine...

However...I can't get the cell to show the date as "MM/dd/yyyy"

Tried everthing I can think of.
If TypeOf e.Item Is GridDataItem Then
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
            Format(Convert.ToDateTime(item.Cells(6).Text), "d")
            item.Cells(6).ForeColor = Drawing.Color.DarkRed
        End If

Open in new window

0
Comment
Question by:lrbrister
2 Comments
 
LVL 13

Accepted Solution

by:
gamarrojgq earned 500 total points
ID: 34097040
Hi,

Try this

item.Cells(6).Text = Convert.ToDateTime(item.Cells(6).Text).ToString("MM/dd/yyyy")
0
 

Author Closing Comment

by:lrbrister
ID: 34097132
Man!  Thanks!

Remind me to buy you a sody-pop sometime!

I was about to go postal on this thing!
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question