T
timnels
I have a custom business object that implements INotifyPropertyChanged
and IEditableObject. The collection of these objects inherits from
BindingList<T>. I created a BindingSource from which a grid (list of
objects) and a detail groupbox where bunch of textboxes are bound to
them.
Problem is I need to detect 2 things:
1. A way to know the current record is dirty (meaning any bound
property has changed), so I can enable/disable the Save and Cancel
toolbar buttons.
2. If the user changes data in the detail box and (without saving)
moves to another row in the grid, ask them if they want to update or
cancel the edit.
I know DataSet have several events and methods (like HasChanges), but
I don't know how to handle this when I am binding to a custom object.
Thanks for your help!
and IEditableObject. The collection of these objects inherits from
BindingList<T>. I created a BindingSource from which a grid (list of
objects) and a detail groupbox where bunch of textboxes are bound to
them.
Problem is I need to detect 2 things:
1. A way to know the current record is dirty (meaning any bound
property has changed), so I can enable/disable the Save and Cancel
toolbar buttons.
2. If the user changes data in the detail box and (without saving)
moves to another row in the grid, ask them if they want to update or
cancel the edit.
I know DataSet have several events and methods (like HasChanges), but
I don't know how to handle this when I am binding to a custom object.
Thanks for your help!