Hello Forum!
I have the following method in a RadGridView-behavior which expands all groups in my RadGridView (just like method ExpandAllGroups()):
private static void onExpandAllCommandBoolChanged( DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs )
{
var radGridView = ( (RadGridViewExpandAndCollapseAllGroupingsCommandBehavior) dependencyObject ).AssociatedObject;
var groups = radGridView?.Items.Groups;
if( groups == null )
return;
foreach( var group in groups )
{
radGridView.ExpandGroup( (IGroup)group );
}
// easier: ((RadGridViewExpandAndCollapseAllGroupingsCommandBehavior)dependencyObject).AssociatedObject.ExpandAllGroups();
}
My task is to expand the same RadGridView-groups after a reload of the RadGridView-data that were expanded before the reload.
To accomplish this, i need the IsExpanded-property of the RadGridView-group, but it isn't available in type Group.
Which datatype can I use to get the IsExpanded-property?
I use WPF and MVVM.
Thank you!