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.
Syncfusion Feedback

Turning off the old sort arrow on a column of a GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

30209 Jun 14,2005 09:46 AM UTC Jun 14,2005 10:11 AM UTC Windows Forms 1
loading
Tags: GridControl
Thabo
Asked On June 14, 2005 09:46 AM UTC

Hi, I am performing a sort on a column. If i sort the column for the first time in ascending order, i can not perform another sort on the same column in descending order. How do i turn off the old sort arrow so that i can perform another sort on the same column. Thanks David

Administrator [Syncfusion]
Replied On June 14, 2005 10:11 AM UTC

Here is a code snippet that will initially sort an unsorted column, or reverse the sort if the column is already sorted.
SortColumnDescriptor scd = this.gridGroupingControl1.TableDescriptor.SortedColumns["ParentDec"];
if(scd == null)
{
	this.gridGroupingControl1.TableDescriptor.SortedColumns.Add("ParentDec");
}
else if(scd.SortDirection == ListSortDirection.Ascending)
	scd.SortDirection = ListSortDirection.Descending;
else
	scd.SortDirection = ListSortDirection.Ascending;

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

;