Reconciling two collections of objects

后端 未结 3 718
后悔当初
后悔当初 2021-01-15 19:16

I have a form where users can modify a collection of objects using a DataGrid. When the form is opened I create a deep copy of the original collection and if the Cancel butt

3条回答
  •  自闭症患者
    2021-01-15 19:33

    Why not keep a copy of the original, and bind to the actual collection. If you bind to the actual collection, then there is no reconciliation. When cancel is pressed, simply replace the actual collection with the copy of the original. It is basically an inversion of what you are trying to do...but it should be a lot easier to manage.

提交回复
热议问题