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

Get item changed on ItemDataBound to export correctly

0 Answers 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 23 Dec 2017, 08:54 PM
We've got a UTC time coming from the database and being assigned to a GridDateTimeColumn in a Grid. We change the time to local time on the ItemDataBound. That all works great. The challenge we have is that when we use the built-in export to Excel, the column reverts back to UTC time. After many hours of searching online and in the forums and trying everything from trying to re-change the value i the ItemCommand, the ExcelMLWorkBookCreated, the ExcelMLExportRowCreated, the prerender and everywhere else we could think of, we're stumped. We can change other items stylistically with those functions but we can't figure out a way to get the DateTime to either export as it is displayed in the grid (local time) or to re-convert it to local time for the export.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Share this question
or