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
close icon

Diabling Sorting

hi In a grouping grid, when a user double clicks on a column header its sorted. I want to avoid this i.e, when a user clicks on a specific col say "col1" it should not be sorted. How to do this? regards, Catinat

1 Reply

AD Administrator Syncfusion Team July 28, 2005 10:18 AM UTC

You can use the TableControlcellClick event.
private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
	GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
	if(style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell)
	{
		if(style.TableCellIdentity.Column != null && style.TableCellIdentity.Column.Name == "Col1")
			e.Inner.Cancel = true;
	}
}

            

Loader.
Live Chat Icon For mobile
Up arrow icon