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

Sorting in Grid grouping control

Hi,

I have a column which has string values. However they translate to some integer values - and i when I click on the column header to sort, I want grid to sort as per the integer values and not alphabetical values. How can I override this default behavior of sorting.

Thanks,
Deepa


2 Replies

NR Nirmal Raja Syncfusion Team August 6, 2008 12:01 PM UTC

Hi Deepa,

Thank you for your interest in Syncfusion product.

The default behaviour of sorting a column can be override using Changing event of the SortedColumn property.
The IComparer interface is to be implemented to compare with in the datas of the column.
The comparison can be made in the interface which returns the integer value that shows the result of the comparison.

Please refer the below sample for more details:
GGC_ColumnSorting

Let me know if you have any queries.

Regards,
Nirmal



AD Administrator Syncfusion Team August 7, 2008 09:49 AM UTC

Thanks for your help. This solution works.

Regards,
Deepa

>Hi Deepa,

Thank you for your interest in Syncfusion product.

The default behaviour of sorting a column can be override using Changing event of the SortedColumn property.
The IComparer interface is to be implemented to compare with in the datas of the column.
The comparison can be made in the interface which returns the integer value that shows the result of the comparison.

Please refer the below sample for more details:
GGC_ColumnSorting

Let me know if you have any queries.

Regards,
Nirmal




Loader.
Live Chat Icon For mobile
Up arrow icon