locked
Resetting To Original Bound Values RRS feed

  • Question

  • I have a grid which is bound to a collection of business logic objects, in this case a collection of BLProject. When the User double clicks on a row in the grid a form is displayed to allow update of the selected BLProject. The form uses databinding to bind the properties of the BLProject to the fields on the form. The User makes changes to the fields and presses the form's Save button which calls the BLProject's Save method which persists the object in the DB, this all works well.

    The problem I have is that if the User makes changes to the fields on the form and then presses the Cancel button which just returns him to the grid without saving to the DB, then the properties of the BLProject still contain the changed values which are then displayed in the grid because it is databound to the BLProject instance.

    when the User presses the Cancel button I somehow need to reset the properties of the BLProject instance back to the original values and was wondering if there was a standard way of doing this

    Any help appreciated.
    John

    Wednesday, December 13, 2006 9:09 AM

All replies