When I have a RadTree with a <NodeTemplate>. ServerSide NodeExpand or NodeCollapse events are not firing but the nodes are expanding and collapsing just fine. Is that the intended behaviour? How do I get these events to fire?
Thanks
Himadri
Thanks
Himadri
6 Answers, 1 is accepted
0
Hello hbanerjee,
I couldn't reproduce this problem by modifying our online example. What could be different in your case? Did you set the ExpandMode property of your nodes to ServerSide? This is required in order for the NodeExpand/NodeCollapse events to fire.
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I couldn't reproduce this problem by modifying our online example. What could be different in your case? Did you set the ExpandMode property of your nodes to ServerSide? This is required in order for the NodeExpand/NodeCollapse events to fire.
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
hbanerjee
Top achievements
Rank 1
answered on 19 Sep 2008, 07:31 AM
Albert
There is no ExpandMode for the RadTreeView Control. It's a property of a node but I have the whole tree declared as a NodeTemplate. Below is the code snippet.
NodeDataBound is firing fine but NodeExpand and NodeCollapse Events are not firing.
There is no ExpandMode for the RadTreeView Control. It's a property of a node but I have the whole tree declared as a NodeTemplate. Below is the code snippet.
NodeDataBound is firing fine but NodeExpand and NodeCollapse Events are not firing.
<telerik:RadTreeView ID="RadTreeView1" Width="100%" runat="server" ShowLineImages="False" OnNodeDataBound="RadTreeView1_DataBound" >
<NodeTemplate>
<div> ......MY HTML STUFF
</div>
</NodeTemplate>
<CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation>
<ExpandAnimation Duration="100"></ExpandAnimation>
</telerik:RadTreeView>
0
Hi hbanerjee,
As I said in my previous reply you need to set the ExpandMode property of your nodes to ServerSide in order to fire the NodeExpand and NodeCollapse events. You can do this by subscribing to the NodeDataBound event.
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
As I said in my previous reply you need to set the ExpandMode property of your nodes to ServerSide in order to fire the NodeExpand and NodeCollapse events. You can do this by subscribing to the NodeDataBound event.
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
hbanerjee
Top achievements
Rank 1
answered on 19 Sep 2008, 08:08 AM
Thank you. It worked but I did notice something different. Now as soon as I do that every node in that tree has the plus sign besides it whether it has a child or not. Before the ones with children had the plus sign. Am I supposed to do something in order for that to go away in the code?
Thanks
Himadri
Thanks
Himadri
0
Accepted
Hello hbanerjee,
You can subscribe to the DataBound event of the treeview (not to be mistaken with NodeDataBound) and traverse all nodes (GetAllNodes()). Then set the ExpandMode property to ServerSide only of nodes which have children (node.Nodes.Count > 0).
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can subscribe to the DataBound event of the treeview (not to be mistaken with NodeDataBound) and traverse all nodes (GetAllNodes()). Then set the ExpandMode property to ServerSide only of nodes which have children (node.Nodes.Count > 0).
Regards,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
hbanerjee
Top achievements
Rank 1
answered on 19 Sep 2008, 08:36 AM
Thank you very much for your support. It works :)
HB