Information générale
Catégorie:
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement