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

loading existing tree data on-demand and on page load

1 Answer 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 13 Jul 2015, 12:20 PM

Hi

 This is probably a really dumb question, but can anyone point me to a simple example of how I can automatically select and expand nodes on my tree on page load?

 Our tree contains a great deal of data, so we're using load on-demand. I need to create a page that allows users to edit an existing tree, but I can't seem to work out how I can load on-demand only the ticked nodes and their siblings.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 15 Jul 2015, 09:11 AM
Hello,

There are two possible approaches:
  • Include the "expanded" and "selected" fields in the returned items with the value set to true for the nodes that should be expanded and selected.
  • Use the expandPath and select methods(live demo).

Regards,
Daniel
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TreeView
Asked by
Ed
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or