DateTimeColumn Sorting

2 posts, 0 answers
  1. Johannes
    Johannes avatar
    66 posts
    Member since:
    Dec 2012

    Posted 20 Jun 2013 Link to this post

    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.
  2. Ivan Petrov
    Ivan Petrov avatar
    717 posts

    Posted 25 Jun 2013 Link to this post

    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.

    Ivan Petrov
    RadChart for WinForms is obsolete. Now what?
Back to Top