Programmatically expand selcted node

3 posts, 1 answers
  1. Tom
    Tom avatar
    12 posts
    Member since:
    Sep 2011

    Posted 26 Mar 2012 Link to this post

    I am attempting to expand a selected node from code when adding a child to it. I have done this in the TreeView using the SelectedContainer and setting the IsExpanded property to true. I can't see a way to do this in TreeListView however. The items in my TreeListView are databound to a list of objects. Is there a way do this in code for the TreeListView?
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 Mar 2012 Link to this post

    Hi,

     You can expand the desired node by using ExpandHierarchyItem(object item) method of the TreeListView.
    Please check how it works and let me know in case you have any further questions.

    Greetings,
    Didie
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Tom
    Tom avatar
    12 posts
    Member since:
    Sep 2011

    Posted 27 Mar 2012 Link to this post

    That was exactly what I needed. Thanks!
Back to Top