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.
Syncfusion Feedback

Sorting in Grid grouping control

Thread ID:

Created:

Updated:

Platform:

Replies:

75670 Aug 5,2008 04:07 PM UTC Aug 7,2008 09:49 AM UTC Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 5, 2008 04:07 PM UTC

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


Nirmal Raja [Syncfusion]
Replied On 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


Administrator [Syncfusion]
Replied On 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




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.

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

;