General information
Category:
The Mere Mortals .NET Framework
While I couldn't find an elegant solution, I found a brute-force solution that seems to be working.
The problem was that changing the data in the control bound to the child biz object was not updating UNTIL the control lost focus. Thus, EndEdit() was accomplishing nothing (the EndEdit() routine seems to iterate through the binding controls and execute EndEdit() on each one to commit the changes). I programmatically changed focus before executing the EndEdit() and everything seems fine. The code I used is:
Control ctlRef = this.ActiveControl; // Get the current control
this.GetNextControl(ctlRef,true).Focus(); // Set focus to next control
ctlRef.Focus(); // Put focus back on the original control
this.EndEdit();
In case someone else has the problem (or a better solution).
Jeff
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only