DataGrid's DataView remains intact after sorting!!!

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

Guest

Hello,

When I click on a column header of a dataview, it sorts fine but the new
view is not reflected in the dataview.

For example: before sorting, ID of row[0] was 1
after sorting this row moves down the grid
but I still get 1 for row[0].

Any comments would be appreciated.
 
Make sure you are checking the exact same DataView as is being used by the
DataGrid. You can use code such as this to get the DataView associated with
the DataGrid's DataSource.

CurrencyManager cm =
this.dataGrid1.BindingContext[this.dataGrid1.DataSource,
this.dataGrid1.DataMember] as CurrencyManager;
DataView dv = cm.List as DataView;

===================
Clay Burch, .NET MVP

Visit www.syncfusion.com for the coolest tools
 

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

Back
Top