Hi,
I am exporting RadGrid data to excel where I have couple of columns of type date. ExportToExcel() converts those date columns to string type. The date columns are specified as below in my RadGrids.
<telerik:GridDateTimeColumn FilterControlWidth="120"
DataField="NearestEndDate"
DataType="System.DateTime"
EditFormHeaderTextFormat="{0:MMM dd, yyyy}"
HeaderText="Next Subscription Expires"
UniqueName="columnNextExpiryDate"
SortExpression="NearestEndDate"
DataFormatString="{0:MMM dd, yyyy}">
<HeaderStyle Width="140px" />
<ItemStyle Width="140px" />
</telerik:GridDateTimeColumn>
Any Idea what is the best way to set the format so that when I export this grid to excel the date column format stays same but the type of column should be date.
Regards
Div
I am exporting RadGrid data to excel where I have couple of columns of type date. ExportToExcel() converts those date columns to string type. The date columns are specified as below in my RadGrids.
<telerik:GridDateTimeColumn FilterControlWidth="120"
DataField="NearestEndDate"
DataType="System.DateTime"
EditFormHeaderTextFormat="{0:MMM dd, yyyy}"
HeaderText="Next Subscription Expires"
UniqueName="columnNextExpiryDate"
SortExpression="NearestEndDate"
DataFormatString="{0:MMM dd, yyyy}">
<HeaderStyle Width="140px" />
<ItemStyle Width="140px" />
</telerik:GridDateTimeColumn>
Any Idea what is the best way to set the format so that when I export this grid to excel the date column format stays same but the type of column should be date.
Regards
Div