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

Check All and Uncheck All

4 Answers 100 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 11 Jan 2010, 09:45 PM
Hi.. I have the following.... When I click the parent checkbox the children are not checked and when I uncheck the parent the children are not unchecked... what am i missing.. I see in you examples this appear to work automatically ?   Why doesn't this? thanks again

 

 

<telerikNavigation:RadTreeViewItem x:Name="InBox" Header="InBox" DefaultImageSrc="Images/4Inbox.png" OptionType="CheckList">

 

 

 

 

<telerikNavigation:RadTreeViewItem.ItemTemplate>

 

 

 

<DataTemplate>

 

 

 

<StackPanel Orientation="Vertical">

 

 

 

<TextBlock Text="{Binding NAME}" FontSize="10" />

 

 

 

</StackPanel>

 

 

 

</DataTemplate>

 

 

 

</telerikNavigation:RadTreeViewItem.ItemTemplate>

 

 

 

 

 

</telerikNavigation:RadTreeViewItem>

 

4 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 12 Jan 2010, 08:17 AM
Hi Jon The Nerd,

Please check this help article:
http://www.telerik.com/help/silverlight/radtreeview-features-checkbox-and-lines-support.html

you need to enable the tri-state mode of the checkboxes in the TreeView.

All the best,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jon
Top achievements
Rank 1
answered on 12 Jan 2010, 12:21 PM
thanks again!
0
Monika Kogler
Top achievements
Rank 1
answered on 05 Oct 2010, 01:22 PM
Hi,

i need have following problem: in the Checked-Event of the TreeView, i need first to uncheck all items in the tree and then only check on special item (accoring to the currently checked item). and i have to do this programmatically.

Things i have tried:
1. tree.CheckedItems.Clear() => Exception
2. set CheckState for each item in tree.Items to ToggleState.On or ToggleState.Off => StackOverflowException.

So how can i set all items in a tree unchecked or checked?
0
Kiril Stanoev
Telerik team
answered on 07 Oct 2010, 12:00 PM
Hello Monika,

Try clearing the CheckedItems in the PreviewChecked event handler. Please find attached a sample project demonstrating this functionality. Let me know if you have further questions or comments.

Best wishes,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Jon
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Jon
Top achievements
Rank 1
Monika Kogler
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or