Browse and Check a TreeView

2 posts, 0 answers
  1. Francis
    Francis avatar
    1 posts
    Member since:
    Dec 2011

    Posted 09 May 2012 Link to this post

    Hello evryone,

    I built a Tri-State treeview from self referencing table and all it's ok, now i want save in a another table the list of items with "ToggleState" = "on" and i don't know how can I do it.

    Please, do you have any example that can help me.
    Thank you.
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 14 May 2012 Link to this post

    Hi Francis,

     So you need to iterate over the RadTreeViewItems, create a collection of the checked items save this collection to the database? You can start with this help article showing a possible way to traverse your tree.
    When iterating, the RadTreeViewItem.DataContext property will give you the business object that is inside the RadTreeViewItem. I guess you will be able to finish the rest - saving a flat collection of DB objects in the DB. 

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top