Single column sort in windows forms datagrid.

  • Thread starter Thread starter Brett P.
  • Start date Start date
B

Brett P.

Hello,
I am trying to have only one column sortable within a
data grid. I know you set the allow sorting property to
true on the style, but this enables sorting for all
columns. Is there a way to override this implementation
so that only a few or one of the columns may be sorted?

thanks,
-brett
 
Instead of having the columns created for you at run-time, you'll need to
manually set up the columns at design-time.
 
I am setting up my columns at design time. How do I turn
off sorting for one single column? The allowsorting
property is on the table style, not on an individual
column.

thanks,
-brett
 
As you click on each column in the DataGrid's properties builder dialog, you
need to make sure that the "sort expression" box is cleared for columns you
don't want sortable.
 
Back
Top