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.

Remove sort arrow in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

72773 Apr 3,2008 09:46 PM Apr 9,2008 11:51 PM Windows Forms 1
loading
Tags: GridControl
spacegoat
Asked On April 3, 2008 09:46 PM

Hello,

There's an unwanted sort arrow on one of the column headers in my grid.

Can anyone tell me how to prevent that arrow from being rendered (programmatically or through Designer)?

Thanks in advance.


Administrator [Syncfusion]
Replied On April 9, 2008 11:51 PM

Hi Spacegoat,

Thanks for the interest in Syncfusion products.

Arrow on the column header indicates the direction of sorting i.e. ascending or descending. You can handle cellClick event and restrict a particular column(s) from sorting and can hide the sort arrow.
You can hide a column with the help of following code.


private void gridDataBoundGrid1_CellClick(object sender, GridCellClickEventArgs e)
{
if (e.ColIndex == 1 && e.RowIndex == 0)//Sort Column rather than 1.
this.gridDataBoundGrid1.SortBehavior = GridSortBehavior.None;
else
this.gridDataBoundGrid1.SortBehavior = GridSortBehavior.SingleClick;
}


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/F42773A/main.htm

Please let me know if it helps.

Regards,
Asem.



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.

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.

;