Hi,
I have a xamGrid binded to IEnumerable collection. Clicking on grid row I open a dialog window (childWindow) where user can change some values of the current record. I would like to change some cells in current grid row after dialog window is closed. I am able to change values in the collection but grid still displays old values.
How can I do it ?
Thanks,
Ed
Hi Ed,
what do you mean by saying "change some cells in current grid"? If you mean the underlying data source objects or the cells more like a UI Elements ?
Regards,
Konstantin ,
I change data object - go through collection, locate current record by ID and then update some fields. I also call RaisePropertyChanged() for the collection. However changed values are not displayed in the grid row.
I tried to make a small working sample to reproduce the problem, but everything working fine in a sample. It might be something wrong with notification in original application. Anyway we found some workaround for this.
Thanks again,
I've just modified the sample that I post earlier to use System.Windows.Data.PagedCollectionView made out of the ObservableCollection used before and was not able to reproduce the issue you're describing. If you provide more details about your scenario(preferably sample app) I will be able to help you more.
Are you using some kind of custom implementation of IPagedCollectionView ?
Konstantin,
Thanks for the sample, I really missed data binding for ActiveItem. However...I added the binding, in my view model I set fields of variable which is binded to ActiveItem. And again, active record's values are not changed on the screen, but after I switch to another view and come back, they are changed.
I think the problem can be in my xamGrid binding - it's ItemSource is not an actual IEnumerable collection but PagedCollectionView created from the collection...
here's a sample solution illustrating how the grid refresh its data whenever PropertyChanged for an item is raised.
Hope this helps,