GridGroupingControl - Prevent few columns from sorting.

Hi, I want to prevent few columns from sorting. I mean user should not be able to click them ideally. Or if he clicks, we should not display sort icon and not do sorting. I am trying with e.Cancel = true in SortedColumns_Changed event. But no use. Earlier I worked with event. SO, i am trying again. Any property/alternative event available? Rgds Rajani Kanth

1 Reply

AD Administrator Syncfusion Team November 24, 2005 05:24 PM UTC

You can use the TableControlQueryAllowSortcolumn event.
private void gridGroupingControl1_TableControlQueryAllowSortColumn(object sender, GridQueryAllowSortColumnEventArgs e)
{
	if(e.Column.Name == "ParentDec")
		e.AllowSort = false;
}

Loader.
Up arrow icon