Bindingsource not updating

You need to call the .update method of the table adapter to update the underlying database. End Edit() 'This sends the updates to the dataset messagebox.show(Ctype(binding Source. Update(data Source.datatable) 'This pushes the updates down to the underlying database Dwight Cor Ligthert [MVP] wrote: When I inspect the Row Changed event, the row data has changed by the control, BUT the Row State remains as unchanged, NOT modified, as one would expect.

bindingsource not updating-36

I call Accept Changes() on the Data Set; this fixes the problem.

Now, however, when my Row Change event is triggered, the data row's Row State never changes to Modified.

I hope this gives an idea, Cor When I inspect the Row Changed event, the row data has changed by the control, BUT the Row State remains as unchanged, NOT modified, as one would expect.

What I have observed is that by calling Accept Changes() when initialising the Data Set BEFORE opening the form causes the above problem.

If I don't do anything to the Data Set other than load data normally through Table Adapters everything works fine.

If I load a table(static data for Combo Box) in the Data Set manually; the Data Set now says it has changes.

Cor "Dwight" In order for the binding source to update the rowstate of the dataset, you must call the .endedit method of the binding source.

You need to call the .update method of the table adapter to update the underlying database. End Edit() 'This sends the updates to the dataset messagebox.show(Ctype(binding Source. Update(data Source.datatable) 'This pushes the updates down to the underlying database Dwight Cor Ligthert [MVP] wrote: news:u$**************@TK2MSFTNGP03gbl...

"Cor Ligthert [MVP]" news:u F****************@TK2MSFTNGP03gbl... Dale, It is probably set but you set it back with acceptchanges. Oherwise it can be that the data is still in the texboxes and notpushed down in the datatable. Cor------=_Next Part_000_002C_01C6D7C4.331BA750Content-Type: text/html; charset=iso-8859-1Content-Transfer-Encoding: quoted-printable X-Google-Attach Size: 2815I understand what you're saying, but that doesn't explain why I suddenlyget a major change in behaviour. I've attached a sample program which demonstrates to me how ridiculous the whole binding stuff is when the obvious events don't get fired off. Column Changed event is triggered, no Binding Source events. "Dwight" In order for the binding source to update the rowstate of the dataset,you must call the .endedit method of the binding source.

Tags: , ,