Hi,
in certain cases I want to reload specific nodes. When it's about nodes under other nodes, this is no problem.
I collapse the node, remove the children, set the expand mode back to webservice and expand the node.
The nodes are loaded-on-demand by the tree.
But when it is about the root nodes, I have to do it myself. I call the webservice, get the nodes but how do I add them to the tree?
This is what I found in the forums (but the post was from 2008).
The nodes from the webservice are correctly converted to RadTreeNode and added. But the attributes of the nodes aren't transferred to the RadTreeNode.
So, how can I add nodes, which I fetch from a webservice, to the tree as root nodes?
Thanks!
Edit: I added screenshot from the Google Chrome debugger where you can see the difference. The webservice returns in both cases RadTreeNodeData and I didn't see any difference regarding the attributes.
in certain cases I want to reload specific nodes. When it's about nodes under other nodes, this is no problem.
I collapse the node, remove the children, set the expand mode back to webservice and expand the node.
The nodes are loaded-on-demand by the tree.
But when it is about the root nodes, I have to do it myself. I call the webservice, get the nodes but how do I add them to the tree?
This is what I found in the forums (but the post was from 2008).
function
AddRootNodesToTree(nodes, tree) {
tree.trackChanges();
tree.get_nodes().clear();
for
(
var
node
in
nodes) {
var
dynamicNode =
new
Telerik.Web.UI.RadTreeNode();
dynamicNode._loadFromDictionary(nodes[node]);
tree.get_nodes().add(dynamicNode);
}
tree.commitChanges();
}
The nodes from the webservice are correctly converted to RadTreeNode and added. But the attributes of the nodes aren't transferred to the RadTreeNode.
So, how can I add nodes, which I fetch from a webservice, to the tree as root nodes?
Thanks!
Edit: I added screenshot from the Google Chrome debugger where you can see the difference. The webservice returns in both cases RadTreeNodeData and I didn't see any difference regarding the attributes.