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:





95944 Aug 11,2010 02:24 PM UTC Aug 12,2010 12:10 PM UTC WinForms 1
Tags: GridControl
Jeff Voigt
Asked On August 11, 2010 02:24 PM UTC

Is it possible to keep the Sorting UI with the columns (and arrows) but to handle the actual sorting of data myself?

We have a grid that can have 80k plus records. Doing the standard sort can take upwards of 40 seconds.

However, we now use an Array to bind the data and if we custom sort the array doing an Array.Sort it takes less than a second. Our current solution is to disable sorting and have a combo box display the columns while doing our own sorting on the selection changed event.

I would like to use the Grids look and feel for the sorting (as to what is sorted) but just replace the entire sort routine w/our own Array.Sort.

I first tried to modify the SortedColumns_changing event by setting the e.Cancel = true but it STILL will do its default sorting...

Where do I start!?


Jisha Joy [Syncfusion]
Replied On August 12, 2010 12:10 PM UTC

Hi jv,

You could prevent the default sorting in GriddataBoundGrid by handling TableControlQueryAllowSortColumn event and setting e.AllowSort is true.

void gridGroupingControl1_TableControlQueryAllowSortColumn(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowSortColumnEventArgs e)

e.AllowSort = false;




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