How to disable sorting feature of DataGrid?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, friends,

In a VC# app, I have a DataGrid with DataTable as its SourceData. This
DataTable has a ColumnStyle collection for each field. In Form_Load event, I
set

myDataGrid.AllowSorting = false;

However, when the form shows up, I can still sort each column.

Any ideas? Thanks a lot.
 
Hi,

Are you sure that nothing resets this property back to the True? try to
check AllowSorting property of the grid at some moment of time after it is
populated.
 
Back
Top