This is a migrated thread and some comments may be shown as answers.

Jump to Node with LoadonDemand

4 Answers 63 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 25 Aug 2008, 11:42 AM
Hello,
I have the following problem:
I am using a treeview with loadondemand. I have to create javascript-links, which expand the treeview at specific nodes. This works if the nodes have already been openen and closed again. Then the nodes have been added to the treeview and open correctly with findnodebyvalue()... But when the nodes haven't been loaded before, they are not found in the treeview. In this case i call an async webmethod, to load this missing nodes up to the targetnode. I have the xml-subtree on the serverside, create appropriate radtreenodes. But how can I update the Tree and insert these radtreenodes? How can I transfer the radtreenodes to the clientside?
Can you help me please?

Thank you very much
Christian

4 Answers, 1 is accepted

Sort by
0
Christian
Top achievements
Rank 1
answered on 27 Aug 2008, 11:50 AM
can't anybody give me a hint solving this problem?
0
Veselin Vasilev
Telerik team
answered on 27 Aug 2008, 12:25 PM
Hi Christian,

You can call the javascript expand() method to the root item and it will fetch its child nodes from either the NodeExpand event or the WebService.

You can check these online examples:
I hope this helps.

Best wishes,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christian
Top achievements
Rank 1
answered on 27 Aug 2008, 01:34 PM
Thank you very much.
Is it also possible to call this expand()-method inside the callback recoursively? I want to be able to expand the Tree deeper than on level.
0
Veselin Vasilev
Telerik team
answered on 27 Aug 2008, 01:47 PM
Hi Christian,

You can call this method only for already loaded nodes. So, you can expand the parent node, then in the OnClientNodePopulated you can expand one of its nodes, etc.

Greetings,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Christian
Top achievements
Rank 1
Answers by
Christian
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or