Home Forums WPF controls Xceed DataGrid for WPF HierarchicalGroupByControl problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26306 |

    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!

    thank you

    Imported from legacy forums. Posted by Matteo (had 2849 views)

    Xceed Support
    Member
    Post count: 5658

    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)

    User (Old forums)
    Member
    Post count: 23064

    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)

    Xceed Support
    Member
    Post count: 5658

    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)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.