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

(RadTreeList) Data binding with sorting and expanding/collapsing

1 Answer 122 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 21 Jun 2016, 07:30 PM
Hi all,

I am having an issue with the data binding associated with expanding/collapsing items as well as with sorting.  For my RadTreeList data source, I am setting the data source to an ArrayList with information that is parsed from a web service. Whenever I expand/collapse an item or attempt to sort the items by a column, the data in the ArrayList is lost, and the RadTreeList refreshes to be empty.  Is there a way to save the data stored in the ArrayList between data bindings?  Extracting the data takes some time, so communicating with the web service each time is not very feasible.  Tell me if I need to provide any more detail.

Thanks!!

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 24 Jun 2016, 12:17 PM
Hi Michael,

Note that you need to bind the control after each operation that the control perform. For this purpose, we recommend to use NeedDataSource event handler which will fire automatically when the control needs to be bound. Nevertheless, if you retrieve the data from a web service you can store the data locally, for instance in a Session and use the stored data to populate the control.
If you still experience some issues I would appreciate if you can share your code declaration and the related code behind in order to better understand your scenario.

Regards,
Kostadin
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
TreeList
Asked by
Michael
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or