views:

35

answers:

2

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?

+1  A: 

After calling endedit, you need to check RowState.

hope this will help you.

paragy
A: 

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.

Jon B