Resorting a DataTable or DataView

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

Guest

Hello.

I have a dataset, with one table. The table contains a column for the sort
order. Is there a way in code, to force the dataset to resort once the order
column has been updated? The only way I've found is to do an update, then
refill the ds. This is extremely inefficient as the user migh want to move a
record from the bottom all the way to the top. I wouldn't think I would have
to make a round trip for every move....

thanks
 
This isn't 'resorting'. This is what the dataview object was made for. So
you can have a sorted view of the data, without having to go to the database
and have your query resort.
 
Yep, as Marina told you.
DataTable doesn't care about sort order nor you can sort it and it doesn't
make sense.
This is a job for DataView.
 
Back
Top