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

TreeList with loadOnDemand of remote HierarchicalDataSource

6 Answers 486 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Itay
Top achievements
Rank 1
Itay asked on 10 Dec 2015, 08:08 AM

I am trying to load remote HierarchicalDataSource to Kendo-UI TreeList with loadOnDemand. I see that the data function is called with the response that consists the first element . But the data is not displayed in the TreeList, instead the message 'No records to display' appears.

Also have notice that the function hasChildren is not called. (BTW: this code works with TreeView)

 

Please advice. 

 

6 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 14 Dec 2015, 08:09 AM

Hello Itay,

 

The TreeList widget can only be bound with TreeListDataSource. The following example demonstrates load on demand - TreeList / Binding to remote data

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Itay
Top achievements
Rank 1
answered on 14 Dec 2015, 11:41 AM

Thanks Nikolay.

 

Is it possible to make TreeList load on demand?

0
Nikolay Rusev
Telerik team
answered on 16 Dec 2015, 07:23 AM

Hello Itay,

 

The example linked in my previous post is demonstrating load-on-demand binding.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Greg
Top achievements
Rank 1
answered on 19 Jul 2016, 08:24 PM
I'm trying to achieve the same thing (TreeList load on demand) - however, the example referenced doesn't illustrate this capability. What am I missing?
0
Dimiter Topalov
Telerik team
answered on 21 Jul 2016, 07:04 AM
Hello Greg,

I will post the answers from ticket ID 1051689 here, so others can benefit as well:

The default behavior of the Kendo UI TreeList is to send a request for the child items only when a parent row is expanded. You can confirm this by exploring the Network tab in the browser's developers tools (F12) for the mentioned demo, or in the following dojo, based on the same example:

http://dojo.telerik.com/IjepA

The length of the dataSource's data is 1 in the beginning, and increases after expanding different items.
The implementation of the remote service, used by our online demos can be found in the following GitHub repository:

https://github.com/telerik/kendo-ui-demos-service

The controller, used in the discussed demo, can be found here:

https://github.com/telerik/kendo-ui-demos-service/blob/master/KendoCRUDService/Controllers/EmployeeDirectoryController.cs

Regards,
Dimiter Topalov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
0
Greg
Top achievements
Rank 1
answered on 21 Jul 2016, 02:01 PM
Thanks Dimiter.
Tags
TreeList
Asked by
Itay
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Itay
Top achievements
Rank 1
Greg
Top achievements
Rank 1
Dimiter Topalov
Telerik team
Share this question
or