This is a migrated thread and some comments may be shown as answers.

Retrieve formatted value from a DateTime column

2 Answers 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Deborah
Top achievements
Rank 1
Deborah asked on 16 Oct 2010, 07:50 PM
I am calculating the required width of my columns. The DateTime columns are all coming out too large because the .Value property of the field is the full date and time, even though the column is formatted to be the short date.

How do I get the formatted value of the column?

Thanks -

2 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 16 Oct 2010, 09:49 PM
Hello Deborah,

Again, please let's move this move on with this discussion on this thread, i believe an universal solution would be better than a specific one.

Best Regads,
Emanuel Varga
0
Deborah
Top achievements
Rank 1
answered on 18 Oct 2010, 11:54 PM
The short answer to this question is that you cannot get the formatted value of the column EXCEPT in the CellFormatting and RowFormatting events.

For more information see the link that Emanuel provided.
Tags
GridView
Asked by
Deborah
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Deborah
Top achievements
Rank 1
Share this question
or