Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a reliable way to set Save/Cancel button status
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Need a reliable way to set Save/Cancel button status
Divers
Thread ID:
00785839
Message ID:
00785839
Vues:
69
I want to find a reliable method for enabling/disabling the buttons based on changes made to a VB.Net form. This was simple in VFP using InteractiveChange() event to set a "changed" status to .T. and enable the buttons.

In .Net I'm getting into way too much complexity so I wanted to see if there is a "Best Practice" or simple method for this that I have missed.

Originally I tried checking the Dataset.HasChanges property but I found I could make changes to a bound textbox and HasChanges return False. So then I started using events such as textbox.Keypress, checkbox.CheckStateChanged, etc. to track changes but there are lots of factors I am having to work around in doing this (Such as "Delete" key is not tracked in Keypess() and many other such oddities). My workaround code is growing larger and more complex, so I figure it's time to check in here and get some advice!

So - has anyone worked out a simple and reliable method for Enabling/Disabling and options? Is there a recommended technique for this I am missing?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform