Hello!
I have a small/big problem... I'm tring to bind some comboboxes
, datagridview
and bindingnavigator
.
My situation:
I load all table and data from different tables into ONE DataSet! Let's say there are tables "MAIN_TABLE"
and "COMBO_TABLE"
.
then I'm doing this:
DataViewManager dsView = dataSet.DefaultViewManager;
//set bindingsource
bindingSource.DataSource = dsView;
bindingSource.DataMember = "MAIN_TABLE";
bindingNavigator.BindingSource = bindingSource;
//set datagridview
dataGridView.DataSource = dsView;
dataGridView.DataMember = "MAIN_TABLE";
//binding combobox to MAIN_TABLE COLUMN
cBox.DataSource = dsView;
cBox.DisplayMember = "ID";
cBox.ValueMember = "VALUE";
cBox.DataBindings.Add("SelectedValue", dsView, "MAIN_TABLE.COMBO_VALUE", true, DataSourceUpdateMode.OnPropertyChanged);
Everything works great only the bindingnavigator move back, next, last and first
doesn't work. the bindingnavigator
also correctly shows how much rows are in "MAIN_TABLE"
BUT THE NAVIGATION DOES NOT WORK!
DOES SOMEBODY KNOW WHY? Please help. I'm using VS2008 and winforms.
Best regards.