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

Handling the click event on column header

Thread ID:





57877 Mar 13,2007 01:52 PM UTC Mar 13,2007 07:44 PM UTC WinForms 1
Tags: GridControl
Aditi Pisal
Asked On March 13, 2007 01:52 PM UTC

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 07:44 PM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to 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