By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,018 Members | 1,163 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,018 IT Pros & Developers. It's quick & easy.

problem with BindingContext[].EndCurrentEdit()

P: n/a
Hi, I'm developing a program in MDI style

I've got 2 froms

MDIForm (parent form)

Form2 (child form with dataGrid1 and myDataSet)

In Form2 I've this

public void UpdateDatabase()

{

this.BindingContext[myDataSet,"mytable"].EndCurrentEdit();

//

// here there is all the code for updating the database

//

}

when I execute the program, when I'm editing and changing the vaule of a
record;

if I call UpdateDataBase() from a button in Form2 the
BindingContext[].EndCurrentEdit() works fine, because it goes out from the
edit mode and with "OleDataAdapter.Update" the data will be updated

if I call UpdateDataBase() from a button in MDIForm the
BindingContext.EndCurrentEdit() doesn't work because the record is still in
edit mode and when I update the database that record wont be updated,

thanks,

Peter
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.