hi i have a datagridview in a form... users by clicking the column name can sort the row data in that column either in ascending or descending orders... how is it possible to disable it? so that the data in rows of every columns stays in that order in which they were on the start of the form... thanks!
+7
A:
Programmatically:
YourDataColumn.SortMode = DataGridViewColumnSortMode.NotSortable;
In the designer:
- Right click your DGV and select 'Edit Columns...' from the popup menu. The 'Edit Columns' dialog appears.
- In the 'Edit Columns' dialog, update the SortMode property to 'NotSortable' for the column(s) you want to disable sorting on.
Jay Riggs
2009-07-16 18:26:43
A:
use a repeater and custom pager control. Forget GridView, DataGrid, etc.
CoffeeAddict
2009-09-30 17:40:17