3 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 13 Oct 2008, 05:54 AM
Hi Kevin,
Try the following code snippet to get the child nodes on the server side.
CS:
Regards
Shinu.
Try the following code snippet to get the child nodes on the server side.
CS:
| protected void RadTreeView1_PreRender(object sender, EventArgs e) |
| { |
| foreach(RadTreeNode parentnode in RadTreeView1.Nodes) |
| { |
| if (parentnode.Expanded) |
| { |
| RadTreeNode ChildNode1 = (RadTreeNode)parentnode.Nodes[0]; |
| RadTreeNode ChildNode2 = (RadTreeNode)parentnode.Nodes[1]; |
| } |
| } |
| } |
Regards
Shinu.
0
kevin
Top achievements
Rank 1
answered on 13 Oct 2008, 06:46 AM
sorry, i want to know.
for example:
protected void RadTreeView1_NodeDataBound(object sender, RadTreeNodeEventArgs e)
{
how to know the "e.Node" has child nodes?
}
thanks
for example:
protected void RadTreeView1_NodeDataBound(object sender, RadTreeNodeEventArgs e)
{
how to know the "e.Node" has child nodes?
}
thanks
0
Shinu
Top achievements
Rank 2
answered on 14 Oct 2008, 06:38 AM
Hi Kevin,
You can try the following approach to see whether a clicked node has child nodes or not.
CS:
Go through the following forum discussion which explains more on this regard.
Node has child or not?
Thanks
Shinu
You can try the following approach to see whether a clicked node has child nodes or not.
CS:
| protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e) |
| { |
| if (e.Node.Nodes.Count == 0) |
| { |
| Response.Write("THIS NODE HAS NO CHILDREN"); |
| } |
| else |
| { |
| Response.Write("THIS NODE HAS CHILDREN"); |
| } |
| } |
Go through the following forum discussion which explains more on this regard.
Node has child or not?
Thanks
Shinu