Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a reliable way to set Save/Cancel button status
Message
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Need a reliable way to set Save/Cancel button status
Miscellaneous
Thread ID:
00785839
Message ID:
00785839
Views:
70
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?
Next
Reply
Map
View

Click here to load this message in the networking platform