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

grid sorting

I am trying to use a grid and sort when the header is clicked, I sucessfully added it to one grid but can't seem to get the second one working. I'm using the basic grid control then adding the following code snippet //turn off column selections - not absolutely needed but does simplify things this.gridControl1.AllowSelection = GridSelectionFlags.Any & ~GridSelectionFlags.Column; //add a sort header to the CellModels... (in 1.0, only available by default in GridDataBoundGrid) this.gridControl1.CellModels.Add("ColumnHeaderCell", new GridSortColumnHeaderCellModel(this.gridControl1.Model)); But it doesn't seem to be working I think I must have forgotten something but don't know what. Any help would be greatly appreciated.

2 Replies

AD Administrator Syncfusion Team September 4, 2003 08:30 PM UTC

Have you looked at this sample, Syncfusion\Essential Suite\Grid\Samples\Quick Start\GridControlSort? You can copy and paste code from that sample to your project to support sorting in a GridControl.


AD Administrator Syncfusion Team September 4, 2003 09:37 PM UTC

thanks for the info

Loader.
Live Chat Icon For mobile
Up arrow icon