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

TreeView with inner Node containing checkboxList

1 Answer 79 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
FISCAL
Top achievements
Rank 1
FISCAL asked on 14 Jul 2010, 11:18 AM
Hi,

I am sure it's possible to have a RadTreeView with checkbox list as inner node. Design time code looks as below


<telerik:RadTreeView ID="lstTree" runat="server" CheckBoxes="false">
                       <Nodes>
                           <telerik:RadTreeNode Text="Node1">
                               <Nodes>
                               <telerik:RadTreeNode Text="InnerNode">
                                   <NodeTemplate>
                                       <asp:CheckBoxList ID="cbList" runat="server" RepeatColumns="2" RepeatDirection="Horizontal"></asp:CheckBoxList>
                                   </NodeTemplate>
                               </telerik:RadTreeNode>
                               </Nodes>
                           </telerik:RadTreeNode>
                           <telerik:RadTreeNode Text="Node2"></telerik:RadTreeNode>
                           <telerik:RadTreeNode Text="Node3"></telerik:RadTreeNode>
                           <telerik:RadTreeNode Text="Node4"></telerik:RadTreeNode>
                       </Nodes>
                   </telerik:RadTreeView



Could you please kindly help me how can I achieve this during runtime (dynamically through code) ?  For example, all nodes are populated from database and so does the checkboxlist.  I have looked into the following documentation but not much of help.

http://www.telerik.com/help/aspnet-ajax/tree_templatesruntime.html

So far I am able to add nodes dynamically but not able to add NodeTemplate to inner node. 

Any help would be highly appreciated.

Thanks a lot.

M G

1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 15 Jul 2010, 04:11 PM
Hi M G,

I've created a sample project to show you how to add CheckBoxList as inner node dynamically.

Find the full code in the attached .zip file.

Please feel free to ask me if something else appears.

All the best,
Veronica Milcheva
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
FISCAL
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or