I am trying to make multiple changes to an observablecollection that is bound to a gridview.
Using linq to locate the items and then making changes.
It seems to work because I loop through in break mode and see it meeting the condition and setting the items Status value for the exact count of items that I am searching for, but I am not seeing changes reflect in gridview that has itemsource of the collection.
I assume since the collection is bound to the grid's ItemSource that it would update the grid automatically... does there need to be a manual update after the update takes place?
Is there a better approach for performance or clarity reasons?
Using linq to locate the items and then making changes.
It seems to work because I loop through in break mode and see it meeting the condition and setting the items Status value for the exact count of items that I am searching for, but I am not seeing changes reflect in gridview that has itemsource of the collection.
// grid.ItemSource = gridItemCollection (ObservableCollection<T>)
var itemsToUpdate = gridItemCollection.Where(item => item.Status.Equals(statusToChange));
foreach
(var item
in
itemsToUpdate) item.Status = newStatus;
I assume since the collection is bound to the grid's ItemSource that it would update the grid automatically... does there need to be a manual update after the update takes place?
Is there a better approach for performance or clarity reasons?