Remember TreeView state when loading nodes from server.

4 posts, 0 answers
  1. Violetta
    Violetta avatar
    6 posts
    Member since:
    Nov 2014

    Posted 12 Jun 2015 Link to this post

    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! :)

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 17 Jun 2015 Link to this post

    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
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Boris
    Boris avatar
    8 posts
    Member since:
    May 2015

    Posted 20 Jun 2015 in reply to Alexander Popov Link to this post

    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 

     

  5. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 24 Jun 2015 Link to this post

    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
Back to Top
UI for ASP.NET MVC is VS 2017 Ready