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

DateTimeColumn Sorting

1 Answer 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Johannes
Top achievements
Rank 1
Johannes asked on 20 Jun 2013, 10:20 AM
Is it possible to display a DateTimeColumn in format "dd.MM.yyyy HH:mm:ss" while sorting this column uses another format, for example "dd.MM.yyyy HH:mm:ss.fff"? I have to display many rows where hour, minute and second are the same any only the milliseconds are different. So sorting has to look on ms but I don't want to display those ms.

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 25 Jun 2013, 09:18 AM
Hi Johannes,

Thank you for writing.

The internal structure of RadGridView includes a logical (data) and visual (UI) layers. You can read more on that in the following help article - Logical vs. Visual Grid Structure. The data layer is responsible for all data operations like filtering, sorting, grouping etc. The UI layer is responsible for converting the data from the data layer into a text or another form suitable for visualization. That said when you have a date time column the data behind it would be stored in DateTime instances. These date time instances always stores the milliseconds and therefore will be taken into account by the data layer. You can then apply a FormatString to the column to not show the milliseconds part and you are good to go.

I hope this will be useful. Should you have further questions, I would be glad to help.

Regards,
Ivan Petrov
Telerik
RadChart for WinForms is obsolete. Now what?
Tags
GridView
Asked by
Johannes
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or