combo datasource

  • Thread starter Thread starter Alejandro González
  • Start date Start date
A

Alejandro González

Hi

I have a combobox binded to a Datatable
something like

combo.DataSource = dt.DefaultView;
combo.DisplayMember = "descField";
combo.ValueMember = "valueField";

it works fine.
Now if I update the datatable I want the combo to reflect those changes.

I'm trying to rebind the combo doing the same 3 lines but it doesn't work,
(the second time the is run then it does the 1st update)

Any help?
thanks
 
Hi

I have a combobox binded to a Datatable
something like

combo.DataSource = dt.DefaultView;
combo.DisplayMember = "descField";
combo.ValueMember = "valueField";

it works fine.
Now if I update the datatable I want the combo to reflect those changes.

I'm trying to rebind the combo doing the same 3 lines but it doesn't work,
(the second time the is run then it does the 1st update)

Any help?
thanks

Maybe try AcceptChanges()? Or save the changes to the database. I
think that as long as your changes are not accepted that you won't see
them. But i'm not sure of this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top