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

Need To : Bind Kendo Treeview with a List<> (MVC 4)

1 Answer 44 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ashwijini
Top achievements
Rank 1
Ashwijini asked on 22 Jul 2015, 06:05 AM

I've been looking for documentation/demos on binding a kendo treeview with a list<> in MVC architecture, but haven't found much information.

- What I have in the controller : List<UserDefined> test = List<UserDefined>();

 1. [Example UserDefined class has the following properties- Id,Name,Age]

 2. So, the List would look like : 

List.Add(new UserDefined { Id = 1,Name = "abc", Age=10};

List.Add(new UserDefined { Id = 2,Name = "def", Age=20};

List.Add(new UserDefined { Id = 3,Name = "ghi", Age=30};

- A strongly typed view is created, to use the above list in the view.

Like so, @model List<UserDefined.test> is registered in the view.

Question : How to bind the above list (test) to the kendo Treeview?

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 27 Jul 2015, 07:21 AM

Hello Ashwijini,

 

I would suggest using the treeview BindTo method that binds the TreeView to a list of items. 

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
Ashwijini
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or