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

Remove sort arrow in GridDataBoundGrid

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.


1 Reply

AD Administrator Syncfusion Team April 10, 2008 03:51 AM UTC

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.



Loader.
Live Chat Icon For mobile
Up arrow icon