My Design page
<
telerik:RadTreeView
ID
=
"tvPropertyType"
runat
=
"server"
Skin
=
"Outlook"
EnableDragAndDrop
=
"True"
OnClientNodeDropping
=
"onNodeDropping"
CheckBoxes
=
"True"
CheckChildNodes
=
"True"
TriStateCheckBoxes
=
"True"
EnableDragAndDropBetweenNodes
=
"True"
DataSourceID
=
"ObjectDataSource1"
DataTextField
=
"DocumentType"
DataValueField
=
"DocumentTypeID"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Root RadTreeNode1"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Child RadTreeNode 1"
>
<
NodeTemplate
>
<
telerik:RadGrid
ID
=
"rgForTree"
runat
=
"server"
>
</
telerik:RadGrid
>
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
</
telerik:RadTreeNode
>
</
Nodes
>
</
telerik:RadTreeView
>
My Code Behind
Protected Sub tvPropertyType_NodeDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tvPropertyType.NodeDataBound
Dim rgForTree As RadGrid = DirectCast(e.Node.FindControl("rgForTree"), RadGrid)
rgForTree.DataSource = Documents.GetPropertyDocumentsForUser(CInt(Me.lblPropertyID.Text), CurrentUser.UserID, e.Node.Value)
rgForTree.DataBind()
End Sub
I am not able to get the reference for the grid.
I have tried the code in "tvPropertyType_DataBound" as well.
I have tried the same code in a button click which is outside the tree.
Still not able to refer the grid in the treeview node