Home › Forums › WPF controls › Xceed DataGrid for WPF › HierarchicalGroupByControl problem
Hi,i need to know, if possible, when one or more groups were added (or removed) to (from) a HierarchicalGroupByControl……. Something like an event, a groups collection to check and so on!
Imported from legacy forums. Posted by Matteo (had 2849 views)
You can register to CollectionChanged for DataGridControl.GroupLevelDescriptions for the master level and DataGridContext.GroupLevelDescriptions for the detail levels
Imported from legacy forums. Posted by Chris [Xceed] (had 431 views)
I investigated about these two events, but they seems to be protected and i can’t register handler for them:
MyDatagridInstance.GroupLevelDescriptions.CollectionChanged += new EventHandler (MyCallBack);
cannot be done due CollectionChanged protection level!
Imported from legacy forums. Posted by Matteo (had 472 views)
You must cast it to INotifyCollectionChanged:
INotifyCollectionChanged collectionChanged = context.GroupLevelDescriptions as INotifyCollectionChanged;
if(collectionChanged != null) collectionChanged.CollectionChanged += new NotifyCollectionChangedEventHandler( myListener.GroupLevelDescriptionsCollectionChanged );
Imported from legacy forums. Posted by Chris [Xceed] (had 3949 views)