I am using a BindingSource in a WinForms project that edits a simple table on a SQL server. I want the "Save" icon to light up when the user tabs off a field if he has changed it. I have tried the HasChanges() method of the DataSet, but this returns false after I have made a change.
How do I tell if the user has changed something?
From stackoverflow
-
After calling endedit, you need to check RowState.
hope this will help you.
-
My problem was that I needed to call EndEdit() from the BindingComplete event. After doing that, HasChanges() (as well as Pete's RowState suggestion) worked.
0 comments:
Post a Comment