ExpandAllItems with NeedDataSource

3 posts, 1 answers
  1. Derek
    Derek avatar
    19 posts
    Member since:
    Jun 2011

    Posted 05 Dec 2011 Link to this post

    I need to begin the treelist with all nodes expanded, and then allow to expand/collapse as needed. I use NeedDataSource for the expand collapse, but the list starts off collapsed by default and I can't use ExpandAllItems() because I'm assuming it used a type of databind method that won't work with the NeedDataSource event. Is there a way to accomplish what I need?

    Thanks, 

    Derek
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Dec 2011 Link to this post

    Hello Derek,

    NeedDataSource event can be used for binding the TreeList. One suggestion is you can expand the treelist in pageload as shown below.
    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        RadTreeList1.ExpandAllItems();
    }

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Derek
    Derek avatar
    19 posts
    Member since:
    Jun 2011

    Posted 06 Dec 2011 Link to this post

    Perfect. Thanks, Shinu.
Back to Top