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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom Sorting

Thread ID:





121514 Dec 22,2015 04:40 PM UTC Dec 23,2015 07:08 AM UTC WPF 1
Tags: SfDataGrid
Soumyajit Roy
Asked On December 22, 2015 04:40 PM UTC


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:SortColumnDescription ColumnName="Country" SortDirection="Descending" />
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.

Soumyajit Roy

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

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:


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.


Jai Ganesh S


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon