I have a weird issue when copying rows from a Telerik's RadGridView into excel, the problem has to do with a DateTime column.
The column in RadGridView has the correct format:
06/17/2016 02:30 PM
But when the user copies the rows and pastes them into excel the format gets screwed up:
2016-06-16 14:30 PM //24hr format with PM period lol
I have noticed that the problem happens only with values whose hour is greater than 12, for example if the value is 06/17/2016 08:54 AM
it will get pasted into excel with the correct format.
So thinking that it has to do with the format i manually set the format string of the column with the following code:
dgv_history.Columns["Repair Date"].FormatString = "{0:MM/dd/yyyy HH:mm}";
I also tried
dgv_history.Columns["Repair Date"].FormatString = "{0:MM/dd/yyyy hh:mm tt}";
But these lines of code only change how the date is displayed in the RadGridView, if i try to copy/paste them into excel the problem persists.
This is how it looks like once pasted into excel:
2016-06-16 13:57 PM
2016-06-16 13:31 PM
6/16/2016 12:55
6/16/2016 12:33
6/16/2016 12:22
6/16/2016 11:48
6/16/2016 11:19
What can i do to solve this problem?, is it a bug?, i have been searching over their documentation but i still can't find anything related.
Thank you
Update 06/20/2016 12:15
Seems that this is a normal functionality of the RadGridView, as seen in this demo page http://docs.telerik.com/devtools/winforms/gridview/copy-paste-cut the result is the same as the one described in this question.