Solved

RadGrid cell format

Posted on 2010-11-09
2
993 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 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