I’m working with a silverlight datagrid that is bound to an observable collection of a business object.
We do not support inline editing of the objects within the grid but we do display a corresponding editing panel for the user selected row.
When the user submits the edits from this panel, I’m persisting the changes in the DB but I’d like the changes to also reflect in the grid.
I know that through the use of the observable collection and notify property changed that if I change the object that the selected row is bound to, the changes will display in the grid.
However, since I’m not inline editing, I need to search the observable collection for the object and make the change to the business object’s instance in the observable collection.
I’d like to avoid having to loop through the collection to find said object but I’m worried this is the only real way.
There’s no other more efficient, less performance-heavy way that I’m not aware of to retrieve an object from a collection correct? Other than simply to loop through until I hit it?
can you bind your edit grid to the selected item of the display grid? Since they are references this will push/pull changes into the observable collection which can then be persisted.