Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Child Won't EndEdit()
Message
De
25/05/2006 10:36:29
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
 
 
À
18/05/2006 14:40:56
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01123346
Message ID:
01124879
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform