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

Remember TreeView state when loading nodes from server.

3 Answers 65 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Anton
Top achievements
Rank 1
Anton asked on 13 Jun 2015, 04:32 AM

Hello, is there an option to remember the state of checkbox'ed items in the TreeView when loading them from the server? Such as when repopulating a complex control the TreeView is a part of?

 Thanks in advance for your speedy reply, Telerik! :)

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 17 Jun 2015, 06:15 AM
Hello Violetta,

This could be achieved by populating the checked and expanded fields of the TreeView items (see example).

Regards,
Alexander Popov
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
0
Boris
Top achievements
Rank 1
answered on 20 Jun 2015, 09:40 PM

Well, show me the same example, but for MVC 

I returning List<TreeViewItemModel> from controller, and some of this TreeViewItemModel have property .Checked = true;

TreeView  didn't make this checkboxes "checked" automatically, I have to provide template with script 

 

0
Vladimir Iliev
Telerik team
answered on 24 Jun 2015, 08:12 AM
Hello Violetta,

Please check the attached demo which shows how to achieve the same behavior using the TreeView MVC wrapper.

Regards,
Vladimir Iliev
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
Anton
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Boris
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or