This is a migrated thread and some comments may be shown as answers.

RadGridView a unique HierarchyItem expanded

0 Answers 157 Views
GridView
This is a migrated thread and some comments may be shown as answers.
rad
Top achievements
Rank 1
rad asked on 07 Oct 2011, 12:11 PM
Hi,

I am using this solution : http://www.telerik.com/community/forums/wpf/gridview/binding-to-the-isexpandable-proeprty.aspx 
An i want to show a unique HierarchyItem expanded.

And when I use this code, the IsExpanded property is reseted :

private void MyGrid_RowIsExpandedChanged(object sender, RowEventArgs e)
        {
            if (changing)
                return;
 
            this.changing = true;
 
            if ((e.Row as GridViewRow).IsExpanded)
            {
                this.MyGrid.CollapseAllHierarchyItems();
                this.MyGrid.ExpandHierarchyItem(e.Row.DataContext);
 
            }
 
            this.changing = false;
        }
 
        private void AttributesGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            ExpandHierarchyItem((RadGridView)sender);
        }
 
        private void ExpandHierarchyItem(RadGridView sender)
        {
            sender.CollapseAllHierarchyItems();
            sender.ExpandHierarchyItem(sender.SelectedItem);
        }
 
        private void MyGrid_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            ExpandHierarchyItem((RadGridView)sender);
        }

Do you have a way for to resolve this problem

Thanks
Regards

No answers yet. Maybe you can help?

Tags
GridView
Asked by
rad
Top achievements
Rank 1
Share this question
or