command to force datagrid to send it's changes to form's dataset

  • Thread starter Thread starter astro
  • Start date Start date
A

astro

Is there a command/syntax that will force a given datagrid to submit it's
changes to it's dataset?

I know the currencymanager is responsable for this.......just can't get it
to work. I've tried;


CType(ctrl, DataGrid).BindingContext.Item(0).EndCurrentEdit()

To no effect.

In MSAccess there is a property called "isdirty" that is flagged true when
an update is pending against the backend. You can force the update by
"isdirty = false". I am looking for something as simple as this ........???


Thanks.
 
Hi,

astro said:
Is there a command/syntax that will force a given datagrid to submit it's
changes to it's dataset?

The DataGrid should automatically submit changes to the bound
DataSet/DataTable. AFAIK there aren't many situations the grid doesn't do
that, one of them is when you are editing a row and closing the Form.

That said, you can force it to submit pending changes (which at the most can
be one row) by calling CurrencyManager.EndEdit():

DataGrid1.BindingContext(DataGrid1.DataSource,
DataGrid1.DataMember).EndCurrentEdit();


HTH,
Greetings
 

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