Hello,
I am using your example at
http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltiptreeview/defaultcs.aspx
To have a treeview launch tooltips. I have some javascript code to Add a Node client side. This works as expected. I have the identical code you have in the markup page OnClientMouseOver(..) that gets called when the user goes over the node. The problem is that the Ajax event does not fire for the New Node. The tooltip does appear though. The ajax event fires for all the other nodes that were added at start up.
After some investigation it seems that the "id" attribute needs to be set. Just like you have done in the RadTreeView_NodeExpand event node.Attributes("id") = Guid.NewGuid().ToString() from your code behind page. However, trying to set this on the client side does not work. Adding the node like the following;
var tree = $find("<%= RadTreeView1.ClientID %>");
tree.trackChanges();
var node = new Telerik.Web.UI.RadTreeNode();
node.set_text("New Node");
node.get_attributes().setAttribute("id","myid")
tree.get_nodes().add(node);
tree.commitChanges();
When I look at the node like so.. node.get_textElement() the id is not set. However, the rest of the IDs of the other nodes are set. If I manually set the ID like so... node.get_textElement().id = "myid", the ID gets set correctly and the tooltip and ajax event fires correctly.
I am wondering if I am doing something incorrectly when adding the Node client side and expecting the Ajax event to fire.
Thanks.
I am using your example at
http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltiptreeview/defaultcs.aspx
To have a treeview launch tooltips. I have some javascript code to Add a Node client side. This works as expected. I have the identical code you have in the markup page OnClientMouseOver(..) that gets called when the user goes over the node. The problem is that the Ajax event does not fire for the New Node. The tooltip does appear though. The ajax event fires for all the other nodes that were added at start up.
After some investigation it seems that the "id" attribute needs to be set. Just like you have done in the RadTreeView_NodeExpand event node.Attributes("id") = Guid.NewGuid().ToString() from your code behind page. However, trying to set this on the client side does not work. Adding the node like the following;
var tree = $find("<%= RadTreeView1.ClientID %>");
tree.trackChanges();
var node = new Telerik.Web.UI.RadTreeNode();
node.set_text("New Node");
node.get_attributes().setAttribute("id","myid")
tree.get_nodes().add(node);
tree.commitChanges();
When I look at the node like so.. node.get_textElement() the id is not set. However, the rest of the IDs of the other nodes are set. If I manually set the ID like so... node.get_textElement().id = "myid", the ID gets set correctly and the tooltip and ajax event fires correctly.
I am wondering if I am doing something incorrectly when adding the Node client side and expecting the Ajax event to fire.
Thanks.