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.

Handling the click event on column header

Thread ID:





57877 Mar 13,2007 09:52 AM Mar 13,2007 03:44 PM Windows Forms 1
Tags: GridControl
Aditi Pisal
Asked On March 13, 2007 09:52 AM

Hi All,
I want to customize the sorting of any column and override the existing sorting behaviour.
In sense ,I want to sort a particular column on my own property and not on the data that is displayed in the column whenever the user clicks on the column header.
Hence I require the event in which i can write the code.

Pls help with the sample code.Thanks in advance

sample requirement.zip

Administrator [Syncfusion]
Replied On March 13, 2007 03:44 PM

Hi Aditi,

If you want to control the selected column sorting in a grid then handle the the TableControlQueryAllowSortColumn event. This was discussed in the below forum thread.


To get the event of double click on column header, you need to subscribe the TableControlCellDoubleClick event and detect the column header. Here is a code snippet.

private void gridGroupingControl1_TableControlCellDoubleClick(object sender, GridTableControlCellClickEventArgs e)
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex ,e.Inner.ColIndex);
if( style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell )
Console.WriteLine("Double Click on column header");

Best regards,


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.