Saving and restoring state of TreeView checkboxes

2 posts, 0 answers
  1. marksweat
    marksweat avatar
    28 posts
    Member since:
    Apr 2007

    Posted 27 Mar 2017 Link to this post

    My app has a TreeView with tristate checkboxes. The state is stored in a database. I'm wondering about the best way to save and restore state for parent nodes that are Indeterminate.

    If I simply save the collection of nodes I get from the treeview.Checked method and restore the same nodes (as checked), the TreeView doesn't end up looking like the original state. Parent nodes that are indeterminate are restored as Checked and all their children are restored as checked.

    Do I need to go through the Checked nodes and remove the ones that are indeterminate for storage? This seems to work differently in the current version of the TreeView than it did in a version from a few years back.

    --Mark

  2. Eyup
    Admin
    Eyup avatar
    3626 posts

    Posted 31 Mar 2017 Link to this post

    Hi Mark,

    Have you tried making avail of RadPersistenceFramework for this scenario?
    https://demos.telerik.com/aspnet-ajax/treeview/examples/applicationscenarios/persisting-treeview-settings/defaultcs.aspx?product=persistenceframework
    http://demos.telerik.com/aspnet-ajax/persistence-framework/examples/overview/defaultcs.aspx

    Regards,
    Eyup
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top