dataset and dataview

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

Guest

If I set a dataview to equal a table in a dataset, then filter that dataview,
how can I reflect this back into my dataset?

TIA,
Amber
 
Hi amber,

I take it that you are using a DataView to filter a DataTable, using the
RowFilter property, and want to have all of the rows that are excluded by
the filter to be removed from the underlying DataTable?

There is no intrinsic framework approach so you'll have to loop through each
row of the DataTable and use [DataTable].Rows.Remove(...) on each row that
contains data that is outside of your filter.

Another options is to fill the DataSet again by modifying your data access
'where' clause to provide the same semantics as the row filter.

- Dave Sexton
 
Back
Top