detect changes to dataset?

thejeraldo

Well-known member
Joined
Jun 9, 2009
Messages
70
Location
Philippines
Programming Experience
1-3
is there anyway where i can detect a change in my data before saving them. my program would kinda go like this for example: say i have a textbox. if i change the value of the textbox, i want my program to detect a change so it lets the user know that changes have been made to the data so they can save the changes or cancel the changes. thanks a lot! :D
 
Not really that easy.. DataSet.HasChanges is supposed to do this but it doesnt work properly because even just navigating over a datatable with a bindingsource causes the rows to change

I Actually iterate every table used on the form, looking for rows that are not unchanged, and then I compare their original and new values to see if anything has changed.. You might also have some usccess hooking into events raised when row or column values change
 
Back
Top