This is a migrated thread and some comments may be shown as answers.

Tree refresh when items added

2 Answers 45 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 22 May 2013, 08:16 AM
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 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 27 May 2013, 06:16 AM
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.
0
Mark
Top achievements
Rank 1
answered on 28 May 2013, 07:50 AM
Perfect - thank you.
Tags
TreeList
Asked by
Mark
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Mark
Top achievements
Rank 1
Share this question
or