C
Chris
I have a data table for which I have set the default view's rowfilter.
If I bind to a control everything is fine. If I go through the table with a
foreach I see everything, not my filtered data.
How would I iterate through with respect to the rowfilter?
MyDataset.Tables["row"].DefaultView.RowFilter = "region='US'";
foreach (DataRow dr in MyDataset.Tables["row"].Rows)
{
this.lblFilter.Text = lblFilter.Text + " --- " +
dr["region"].ToString();
}
TIA,
Chris
If I bind to a control everything is fine. If I go through the table with a
foreach I see everything, not my filtered data.
How would I iterate through with respect to the rowfilter?
MyDataset.Tables["row"].DefaultView.RowFilter = "region='US'";
foreach (DataRow dr in MyDataset.Tables["row"].Rows)
{
this.lblFilter.Text = lblFilter.Text + " --- " +
dr["region"].ToString();
}
TIA,
Chris