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

2 posts, 0 answers
  1. Ashwijini
    Ashwijini avatar
    4 posts
    Member since:
    May 2013

    Posted 22 Jul 2015 Link to this post

    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?

  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 27 Jul 2015 Link to this post

    Hello Ashwijini,


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


    Boyan Dimitrov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top