Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1001
  • Last Modified:

RadGrid cell format

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
Larry Brister
Asked:
Larry Brister
1 Solution
 
gamarrojgqCommented:
Hi,

Try this

item.Cells(6).Text = Convert.ToDateTime(item.Cells(6).Text).ToString("MM/dd/yyyy")
0
 
Larry Bristersr. DeveloperAuthor Commented:
Man!  Thanks!

Remind me to buy you a sody-pop sometime!

I was about to go postal on this thing!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now