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

RADGrid as a node of RADTreeview

2 Answers 121 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Omarr
Top achievements
Rank 1
Omarr asked on 14 Oct 2008, 07:45 PM
How is it possible to show the RADGrid as a node inside a RAD Treeview? I need to populate the RADGrid on node expand event and then show the records per treenode.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Oct 2008, 05:14 AM
Hi Omarr,

Try adding the RadGrid in the NodeTemplate of RadTreeView to achieve the desired scenario.

ASPX:
 <telerik:RadTreeView ID="RadTreeView1"  runat="server"  OnNodeClick="RadTreeView1_NodeClick" OnPreRender="RadTreeView1_PreRender" OnNodeDataBound="RadTreeView1_NodeDataBound"
          <Nodes > 
            <telerik:RadTreeNode   Text="America" > 
             <Nodes> 
               <telerik:RadTreeNode  runat="server"  Text="Canada" > 
               <NodeTemplate> 
                <telerik:RadGrid ID="RadGrid3"  DataSourceID="SqlDataSource1" AutoGenerateColumns="true" runat="server"
                </telerik:RadGrid> 
            </NodeTemplate> 
               </telerik:RadTreeNode> 
                ... 


Thanks
Shinu.
0
Omarr
Top achievements
Rank 1
answered on 15 Oct 2008, 02:22 PM
I need a global node template, secondly I need to populate the grid based on the expanded node value. Somehow it is not working. The treeview itself is dynamic. Could you please provide a sample working code for this?
Tags
TreeView
Asked by
Omarr
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Omarr
Top achievements
Rank 1
Share this question
or