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

Using the GridControl / GridListControl as a sorted list view?

Is it possible to configure the grid control to behave as a sorted list view? What I would like is a cross between the GridListControlSample and the SortedGridControl examples. I would like to be able to have multiple columns and be able to sort by clicking on the column headers. I would like the sorted column to display an arrow icon to indicate the sort direction. I would also like clicking on a single item to result in the whole row being selected? Thanks in advance, Nik

1 Reply

AD Administrator Syncfusion Team December 2, 2002 09:55 PM UTC

You can combine the techniques in the GridControlSort sample and the HighLightCurrentRow sample to implement this. In the GridControlSort sample, make all the cells use the Static celltype instead of the default TextBox. You can do this by setting gridControl1.TableStyle.CellType = "Static"; Then add the 3 event handlers CurrentCellDeactivated, CurrentCellActivated and PrepareViewStyleInfo as described in the HighLightCurrentCell sample. Attached is a modified GridControlSort sample showing these changes.

Live Chat Icon For mobile
Up arrow icon