Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Sorting in Groups is not correct
posted

Hello,

so I have a Problem with the xamDataGrid and the Sorting of the Groups. I have a DAteValidFrom Column which is Bound to an Nullable DateTime.

When I sort the Column in the Grid the Result is correct:

Bilder-Upload.eu - share DEINE Bilder

But if I Group by this Column the Sorting is not correct:

Bilder-Upload.eu - share DEINE Bilder

How to fix that with the least effort?

Parents
  • 34430
    Verified Answer
    Offline posted

    Hello CSchmitt,

    Thank you for your post.

    It appears from your screenshot that your nullable DateTime field is sorting by the day column, assuming that your formatting of your DateTime is MM.DD.YYYY. You should be able to sort your DateTime field by the actual date by setting the XamDataGrid.FieldSettings.GroupByMode property to "Date." If you are looking to set it on a particular Field, though, you can set it on the Field's Settings as well to have it only apply to that particular field in the grid. The code for that would look like the following:

    <ig:Field Name="MyField">
    <ig:Field.Settings>
    <ig:FieldSettings GroupByMode="Date"/>

    I have attached a sample project to demonstrate the above. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XDGNullableDateTimeGroupSort.zip
Reply Children