How to Cancel all Databindings

  • Thread starter Thread starter Andreas Zita
  • Start date Start date
A

Andreas Zita

I have databound an object to some controls in a edit-form. I would like to
allow the user to cancel all the changes made by pressing "Cancel" button or
confirming the changes by pressing "OK". I rather don't want to manually
transfer the properties from a cloned object ... is there a way of doing
this nice and tidy the .net way?

/Andreas Zita
 
Could you make a copy of your bound object, and if the user cancels, replace
the actual with the copy?
If your databound object is a DataRow, you can just clone the ItemArray.
 
Back
Top