DataGrid Grouping Expander Visibility

Jun 12, 2010 at 4:13 PM

Hi,

i have a CollectionView bound to a datagrid.

I created a GroupStyle.HeaderTemplate and everything works fine. Now i would like to hide 2 of 3 Group Expandern. I don't have a clue how todo that :( I tried unsuccessfully to find the Expandern objects...

 

Thanks!

Jun 13, 2010 at 1:19 PM

Can someone help me please...?

Why its not possible to travel down the logic tree?

 

        void WalkDownLogicalTree(object current)
        {
            stu(current);

            DependencyObject depObj = current as DependencyObject;
        
            if (depObj != null)
                foreach(object logicalChild in LogicalTreeHelper.GetChildren(depObj))
                    WalkDownLogicalTree(logicalChild);
        }
        
        void stu(object current)
        {
            
            MessageBox.Show(current.ToString());
            
        }