AD
Administrator
Syncfusion Team
June 22, 2005 05:27 PM UTC
So, the dates are displayed in the proper format, it is just that the time is the wrong value.
If this is a readonly grid, then you could use the grid.DrawCelDisplayText event. There you can get the DateTime object from the style.CellValue. Then call the ToLocalTime() method on this DateTime object to convert it from UTC to local. Then you can format the converted object, and set the formatted string into e.Text.
If it is not a ReadOnly grud, then you would have to use the QueryCellFormattedText and SaveCellFormattedText events to flip the time from UTC to local in QueryCellFromattedText and then from local to UTC in SaveCellFormattedText.
DateTime d;
d.ToLocalTime();