Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Child Won't EndEdit()
Message
From
25/05/2006 10:36:29
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
 
 
To
18/05/2006 14:40:56
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01123346
Message ID:
01124879
Views:
17
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
Map
View

Click here to load this message in the networking platform