Tree refresh when items added

3 posts, 0 answers
  1. Mark
    Mark avatar
    10 posts
    Member since:
    May 2013

    Posted 22 May 2013 Link to this post

    I am looking into the viability of the treelist control and have a question.

    I have a sample treelist on the screen where the data source is a simple list of data objects.

    I have a button the screen that just adds an extra item of data to the server side data list, but I need to know how to get the tree to refresh automatically.  If I expand any item in the tree, my new item appears, so I know the new data is being added.
  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 27 May 2013 Link to this post

    Hi,

    Thank you for contacting us.

    When you add/remove items manually from RadTreeList datasource you may need to call the Rebind() method manually if you are not using the control events. Additionally, you may need to set the DataSource property to null before calling the Rebind() method if you need to explicitly call the NeedDataSource event.

    Give these suggestions a try and you should not have problems.

    Regards,
    Andrey
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark
    Mark avatar
    10 posts
    Member since:
    May 2013

    Posted 28 May 2013 Link to this post

    Perfect - thank you.
Back to Top