TreeList Expand/Collapse

2 posts, 0 answers
  1. Jesus
    Jesus avatar
    1 posts
    Member since:
    Oct 2014

    Posted 31 Oct 2014 Link to this post

    Hi all,

    how could we be able to expand/collapse a treeview without passing by the needdatasource event ?

    I mean:
        we have a page with a treelist control.
    The first load (!page.ispostback) we need to load it empty. The second load (page.ispostback) we load the treelist control with the results of a filter options.

    If we click on expand/collapse button it doesn't work (expand/collapse)

    Every time we  start an event, treelist goes on needdatasource event to load the object.

    How could we be able to expand/collapse a treeview without passing by the needdatasource event , load it and click on expan/collapse button to expand or collapse nodes?

    Hope you undestand.
    Thank you

    BR
    Jesús

  2. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 05 Nov 2014 Link to this post

    Hi Jesus,

    Thank you for contacting us.

    I am afraid you cannot avoid calling of NeedDataSource event handler when you expand or collapse an item. The reason is that the whole data could not be initially loaded and when expanding an item the needed data is retrieved from the datasource. Nevertheless if you want initially to display RadTreeList empty then you can add the isPostBack check in NeedDataSource event.

    Regards,
    Kostadin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top