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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl - Prevent few columns from sorting.

Thread ID:

Created:

Updated:

Platform:

Replies:

37558 Nov 24,2005 03:51 PM UTC Nov 24,2005 05:24 PM UTC WinForms 1
loading
Tags: GridControl
Badri Rajani Kanth
Asked On November 24, 2005 03:51 PM UTC

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

Administrator [Syncfusion]
Replied On 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;
}

CONFIRMATION

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.

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

;