Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering a DataTable

Status
Not open for further replies.

NickSwift

IS-IT--Management
Jun 20, 2003
2
GB
I have a dataset with 3 data tables and two relationships.
I set a rowfilter on the first data table (via the "DefaultView" property, with RowStateFilter set to "CurrentRows). This filter works correctly (checked by row counts of datatable).

However, as soon as I assign this to the datasource of a control (in my example, a DataGrid), the filter is lost, giving me the full record set.

Has anyone any ideas on solving this theorectically simple issue!???

Thanks
Nick.
 
Solved myself, may be useful information for anyone out there.

When assigning a filter to a dataset table/view, this must be done after the datatable has been attached to a datasource for a displaying control (such as a grid).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top