I think I must be missing something basic about DataViews, because I have a problem 
that I don't understand at all. I would really appreciate it if someone could shed 
some light on this. What is the difference, as far the currency manager goes, between 
a DataView created from DataTable.DefaultView and a DataView explicitly created, then 
the Table property set? I'm getting very different behaviours depending on how I 
create the DataView.

I have a WinForm with three main elements, a combobox, a listbox, and a groupbox. The 
groupbox contains a number of bound fields. The dataset contains two tables (A & B). 
What I am trying to do is have the listbox and groupbox (and controls therein) bound 
to fields in table B, but have the items in the listbox filtered by the selection of 
the combobox (bound to table B). To do this, I bound the listbox and controls to a 
DataView. 

In the combobox SelectIndexChanged event, I have
filteredView.RowFilter = "ThemeID = " + cboTheme.SelectedValue;

If I create the DataView explicitly, then when I call 

BindingContext[lookupData, dataTable.ToString()].EndCurrentEdit();

the edits don't get picked up. But, if I create the view using dataTable.DefaultView, 
then listbox and combobox's selections reset when I click a button (I can provide more 
details here if needed), but the edits are picked up. Any ideas?

Thanks, and sorry for the long post,

Erick

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to