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

[Solved] Visible/invisible expander at TreeviewNode manually?

1 Answer 105 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Huy Truong The
Top achievements
Rank 1
Huy Truong The asked on 22 May 2009, 05:36 AM
Dear,

My purpose is to visible expander symbol at TreeviewNode which has child nodes and invisible expander symbol at TreeviewNode which does not have any childnodes manually.
Example
+AA
BB (no childnode)
CC (no childnode)
+DD

I load data for limited level at once (not all data)

Do you have any SET method to control expander symbol display or not? I can not find this SET method in this object control. Thank you for your helps.

Best regards,
Huy

1 Answer, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 25 May 2009, 07:04 AM
Hello Huy Truong The,

You can use the load on demand feature of the RadTreeView. Check this online sample:
http://demos.telerik.com/silverlight/#TreeView/LoadOnDemand

Here is the code that you wil need:

<telerikNavigation:RadTreeView IsEditable="True" IsLoadOnDemandEnabled="True" LoadOnDemand="RadTreeView1_LoadOnDemand" x:Name="RadTreeView1">  
                <telerikNavigation:RadTreeViewItem Header="ITem1" x:Name="Item1"></telerikNavigation:RadTreeViewItem> 
            </telerikNavigation:RadTreeView> 


        private void RadTreeView1_LoadOnDemand(object sender, Telerik.Windows.RadRoutedEventArgs e)  
        {  
            RadTreeViewItem item = e.OriginalSource as RadTreeViewItem;  
            item.IsLoadOnDemandEnabled = false;  
            // load the data for this item here
        }  
 



Greetings,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
Huy Truong The
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Share this question
or