I'm struggling with expanding Groups (Telerik.Windows.Control version 2016.1.217.1050)
I've tried some of recipes found on this forum, but nothing worked. What am I doing wrong?
My code snippet:
private void LayoutRoot_OnLoaded(object sender, RoutedEventArgs e) {
if (ServicesGridView?.Items?.Groups == null) {
return;
}
// method A
foreach (var it in ServicesGridView.Items) {
var groupRow = ServicesGridView.ItemContainerGenerator.ContainerFromItem( it ) as GridViewGroupRow;
if ( groupRow != null ) {
groupRow.IsExpanded = true;
}
}
// method B
foreach (var it in ServicesGridView.Items.Groups) {
IGroup g = it as IGroup;
ServicesGridView.ExpandGroup(g);
}
// may be this? not either...
ServicesGridView.InvalidateArrange();
}