How to disable sorting feature of DataGrid?

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.
 
V

Val Mazur

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top