Hi,Could you please help me with XamGrid.InvalidateData ?I have Hierarchical grid:RootItem1 - Sub Items... <-- I can set GroupBy to those.RootItem2....I'm raising xamGrid.InvalidateData(true) when grid viewModel updates - but this procedure also is resetting groups collapse/expand state in all items.Is there a way to InvalidateData on subitems of only specific RootItemX node (expecting that groups in other RootItems would preserve correct state)?
Hi Nikita,
InvalidateData only exists on the XamGrid itself so there's no way to use it on just a sub section of rows instead. And that method causes sorting and groupby operations to be invalidated which is why the expansion state is lost when you call this.
Is it really necessary to call InvalidateData when your view model updates? What kind of view model update are you performing that requires the InvalidateData method? INotifyPropertyChanged and INotifyCollectionChanged are fully supported by the control so there's usually no reason to call that method if you need to update the XamGrid to show changes in the underlying data.
Thanks Rob,
I just tried few things:1. rootItem.SubItems = new ObservableCollection <- this work but grid has a bug - column headers and group rows removed from grid and headers only on specific actions (like removing groups from group area).2. rootItem.SubItems.RaiseResetColllection <- this works perfectly - XamGrid updates only specific rootItem (To do this i overrided default ObservableCollection and added RaiseResetColllection method which raises INotifiyCollectionChanged event)