Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Flushing' data-bound controls
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
'Flushing' data-bound controls
Divers
Thread ID:
00845238
Message ID:
00845238
Vues:
55
If I edit a data-bound control on a form, then click on the form's "close" button without allowing the control to lose focus, the new value of the control is not reflected in the bound DataSet. I have a handler for the Closing event that is checking for changes to the data set, but if the user doesn't shift focus off the current control (in my case, a DataGrid) before clicking the close button, the changed values do not get written to the DataSet.

Any ideas on how this problem can be addressed?

We had this same problem in Visual FoxPro. The solution was to find out which control has focus, and simply re-set focus to that control. This would cause the LostFocus() and Valid() EventMethods to fire, and flush the new value of the control to the bound cursor.

Not knowing what else to try, I tried this in my .NET form, both resetting focus to the control that has focus, and also shifting focus programmatically to a prior control, but neither had any effect.

Someone must have solved this sometime or other! <s>

Thanks.
>>-Steve->>

Steve Sawyer
Geeks and Gurus, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform