I have a Grid in which dates are always displayed in MM/dd/yyyy format. However, when we export the grid to Excel, we want the date format to be culture-specific. For example, a US-based user would see 5/27/2014 for today's date while a UK-based user would see 27/05/2014.
Is there a simple way to accomplish this? Setting the Culture property of the Grid did not do the trick. I eventually solved the problem by putting some code into the Grid's ExportCellFormatting event in which I convert the Cell.Text to a DateTime (from a string) and subsequently cast the DateTime to a string for the Culture that I retrieve from Request.UserLanguages.
Thanks in advance!
Is there a simple way to accomplish this? Setting the Culture property of the Grid did not do the trick. I eventually solved the problem by putting some code into the Grid's ExportCellFormatting event in which I convert the Cell.Text to a DateTime (from a string) and subsequently cast the DateTime to a string for the Culture that I retrieve from Request.UserLanguages.
Thanks in advance!