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

According to the father node, how to make all it's child nodes be checked?

1 Answer 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Starry
Top achievements
Rank 1
Starry asked on 07 Jun 2012, 07:45 AM
According to the father  node,   how  to  make   all  it's child nodes  be   checked ?

“RadTreeViewItem”  has  no  "IsChecked"  Property ,  how  to do ???

The  code as below:
   
     private void rtv_BuildingList_Checked(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            if ((e.Source as RadTreeViewItem).HasItems)
            {
                foreach (RadTreeViewItem item in (e.Source as RadTreeViewItem).Items)
                {
                    
                    //item.IsC = true;
                }
            }
        }

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 11 Jun 2012, 07:22 AM
Hello Starry,

 RadTreeViewItem has both IsChecked and CheckState properties. In all scenarios it is better to work with the CheckState property. This blog post describes their differences.
As for making child items checked when their parent is checked, you only have to set the IsInTriStateMode = True.

Regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
General Discussions
Asked by
Starry
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or