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.
Unfortunately, activation email could not send to your email. Please try again.

Custom Sorting

Thread ID:

Created:

Updated:

Platform:

Replies:

121514 Dec 22,2015 11:40 AM Dec 23,2015 02:08 AM WPF 1
loading
Tags: SfDataGrid
Soumyajit Roy
Asked On December 22, 2015 11:40 AM

Hello,

Could you please send me a sample how to apply a custom sorting on a column in sfDataGrid. 

I am trying to apply the sorting on a column whose type is string using---
<syncfusion:SfDataGrid.SortColumnDescriptions>
<syncfusion:SortColumnDescription ColumnName="Country" SortDirection="Descending" />
</syncfusion:SfDataGrid.SortColumnDescriptions>
But it does not work.

I wrote a custom IComparer for that column (Country) and try to add that to the SortComparers collection of sfDataGrid but sfDataGrid does not seem to support SortComparers.

Finally I have downloaded a sample from your site on how to use custom sorting. It works with .Net4.5 but does not work with .Net4.5.1?

 I am using Net4.5.1

Appreciate your help.

Regards,
Soumyajit Roy


Jai Ganesh S [Syncfusion]
Replied On December 23, 2015 02:08 AM

Hi Soumyajit,


Thank you for contacting Syncfusion Support.


We have analyzed your query. You can apply the custom sorting for a column in SfDataGrid by using the Custom Comparer. We already have a UG document that explains “CustomSorting for Columns”


UG Link:

http://help.syncfusion.com/wpf/sfdatagrid/sorting#custom-sorting


Sample: http://www.syncfusion.com/downloads/support/directtrac/148754/ze/CustomSorting1975669452


In the above sample, we have used the .Net Framework version 4.5.1 and the custom sorting works fine from our side. If the issue still persists, please share more information about the issue or the sample you have tried. This would be more helpful for us to analyze further.


Regards,

Jai Ganesh S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;