We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataGrid + Sort arrow disappears.

Hi.

I have a problem when doing custom sorting on the DataGrid.

I've attached an eventhandler with Grid.SortColumnsChanging += Grid_SortColumnsChanging.

Now, in the eventhandler I have e.Cancel = true as the last line, so that it won't continue doing the default sorting (it results in an exception due to my dataentity). But when I do this cancel, the grid won't show the sort direction, or the sort column, in the column headers. 

How do I fix this?

//Nicky

4 Replies

DV Dineshprabhu V Syncfusion Team July 31, 2013 11:18 AM UTC

Hi Nicky,

 

Thanks for contacting Syncfusion support.

 

We have analyzed your query. By using the custom sort comparer, you can achieve the custom sorting in DataGrid. To know more about custom sorting please refer the following link.

 

UG Link: http://help.syncfusion.com/UG/winrt/default.htm#!Documents/sorting.htm

 

However, if you set e.Cancel as true in SortColumnChanging event, DataGrid skip the sorting operation and doesn’t show the Sort Icon in column header.

 

Please let us know if you require further assistance on this.

 

Thank you,

Dineshprabhu V



NM Nicky Mogensen July 31, 2013 01:48 PM UTC

Thank you. I will look into this tomorrow, and then return back how it worked out :)


NM Nicky Mogensen August 1, 2013 08:01 AM UTC

Thank you. It worked like a charm :)


DV Dineshprabhu V Syncfusion Team August 1, 2013 10:00 AM UTC

Hi Nicky,

 

Thank you for your update.

 

Please let us know if you need further assistance.

 

Thank you,

Dineshprabhu V


Loader.
Live Chat Icon For mobile
Up arrow icon