BindingSource - Detail view - Is Current record dirty?

A

A.M-SG

In a Windows Form, I have a set of detail controls bound to a table in a
dataset through a BindingSource. I cannot figure out how to tell if the
user has edited any data in the controls that needs to be saved to the
database.

The EndEdit method will force any changes to update back to the dataset, but
how can you tell if any changes were made. Where is the IsDirty property?

In a DataGridView, there is a IsCurrentRowDirty flag that can be checked on
RowLeave, but I cannot find anything equivelant on the Detail view controls.


Thank you,
Alan
 
J

Jeffrey Tan[MSFT]

Hi Itzik ,

Thanks for your post.

I am not sure what Details View control you are talking about. I think we
can use DataSet's HasChanges() method to check the data source change. For
more information, please refer to the link below:
"Checking for Changed Rows"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbtskCheckingForChangedRows.asp

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top