On both your ToDV and FromDV you are repointing your reference to a table.
You simply need to set the DataView's Table property to the relevant table.
e.g. this is a snippet of some of my code where i use a dataview to show a
user all changes they have made via datagrid1.
this.oleDbDataAdapter1.Fill(dataSet11);
this.dataGrid1.DataSource = dataSet11.Tables[0];
this.dataView1.Table = dataSet11.Tables[0];
this.dataView1.RowStateFilter =
System.Data.DataViewRowState.ModifiedOriginal;
this.dataGrid2.DataSource = dataView1;
br,
Mark.
[quoted text, click to view] "Troy" <Troy@discussions.microsoft.com> wrote in message
news:2BC26D9C-FD84-4A8C-9CAB-AB1D1A6FF948@microsoft.com...
>I was under the impression that you could use data views to have multiple
> sorts and filters on a dataset or data table. I want to bind two
> different
> combo boxes to different data views for a single table. I set the row
> filter
> for the first data view and bind the view to the combo box, I then set the
> row filter for the second view and bind it to the second combo box. Both
> combo boxes display the last row filter applied to the data set even
> though
> they were bound to different views? I think I am missing something.
>
> ToDV = addresses_DS.Tables["Customer_Address_MSTR"].DefaultView;
> ToDV.RowFilter = "TypeID = 'To'";
> ToDV.Sort = "NameID";
>
> toName.DataBindings.Clear();
> toName.DataSource = ToDV;
> toName.DisplayMember = "NameID";
> toName.ValueMember = "NameID";
> toName.SelectedItem = null;
>
> FromDV = addresses_DS.Tables["Customer_Address_MSTR"].DefaultView;
> FromDV.RowFilter = "TypeID = 'From'";
> FromDV.Sort = "NameID";
>
> fromName.DataBindings.Clear();
> fromName.DataSource = FromDV;
> fromName.DisplayMember = "NameID";
> fromName.ValueMember = "NameID";
> fromName.SelectedItem = null;
>
>
>
> --
> T.Kitt