Completed
Last Updated: 01 Apr 2020 09:10 by ADMIN
Kyle
Created on: 13 Aug 2012 15:11
Category: Kendo UI for jQuery
Type: Feature Request
42
TreeView allow HierarchicalDataSource to be fully loaded at once, rather than requiring single load events
Current when using the HierarchicalDataSource you can only load one level of data at a time. I would like to be able to pre-populate the entire tree (but have the ability to refresh it via remote data, should I so need).
18 comments
ADMIN
Aleksandar
Posted on: 01 Apr 2020 09:10

Hello Boris,

Thank you for the feedback and the additional details provided. We will discuss the proposed suggestion and consider reopening the thread. 

To make a single request to the remote endpoint you could make a single AJAX request to get all the data, and then provide it to the dataSource as demonstrated here:

https://docs.telerik.com/kendo-ui/framework/datasource/custom-hierarchical#fetching-hierarchy-through-single-requests

Regards,
Aleksandar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Boris
Posted on: 25 Mar 2020 19:43
Just to be sure, I meant of course loadOnDeman = false, but unfortunately this forum does not allow to edit ones postings... ;-)
Boris
Posted on: 25 Mar 2020 09:06

Hello Aleksandar,

setting loadOnDemand to true will cause Kendo to load the children of every single node with a *separate* GET request which can result in several hundert inefficient calls to the remote server. As the title of this thread implies, the idea is to be able to load the whole tree with *one* call, but even if you return the whole tree, Kendo will continue to load all nodes with children. So no, this thread has not yet been answered and should not be set to completed, so please reopen it for further discussion...

Thanks and stay safe,

Bo

 

ADMIN
Aleksandar
Posted on: 25 Mar 2020 08:41

Hello Boris,

Loading the entire data for the TreeView is already possible and the behavior can be configured via the loadOnDemand configuration option. When set to false all child nodes will be loaded at initialization time.

Regards,
Aleksandar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Boris
Posted on: 18 Mar 2020 13:40
Hmm, it's been years and it seens no progress has been made. Really? Alternatively, how can one make sure that filtering accesses the entire data source even when it was initialized as load on demand?
Jared
Posted on: 29 Feb 2016 19:39
Agree that this is has not been completed in a satisfactory manner.  Although the hierarchy loads all at once, the child nodes return FALSE for loaded() until you physically traverse through the tree, calling load() on each branch independently.
Darryl
Posted on: 11 Dec 2015 16:15
I agree that it would be useful to pass the whole tree as an object without the need for multiple requests to the server.
 
Imported User
Posted on: 18 Sep 2015 12:05
Why has this been marked as completed? The requested functionality is still not available.
ADMIN
Telerik Admin
Posted on: 25 Apr 2014 15:49
I checked our support system and it seems you asked this question before, and one of my colleagues provided the following reply:

"You can use the HierarchiclaDataSource data() method (https://github.com/telerik/kendo-docs/blob/production/api/framework/datasource.md#data) to set the data of the datasource, as outlined in the custom binding help topic (https://github.com/telerik/kendo-docs/blob/production/getting-started/framework/hierarchicaldatasource/custom-binding.md#fetching-a-complete-hierarchy-though-a-single-request)."

You haven't responded to it. In case you have additional inquiries, please send them in the aforementioned support thread.
Tomas
Posted on: 18 Apr 2014 16:50
I think it's a matter of interpretation, not a "variation". You choose to interpret the original proposition in a way that allows you to mark it as "completed". I on the other hand, think it is far more likely that the feature request is what I have described. I don't think the community would waste 89 votes on something that was always already a (pretty much useless) built-in feature.

Not sure what your agenda is but I get a really bad vibe from this. A year and a half has passed since the feature request was posted, 89 votes has been cast and still nothing has happened. And now you're just dismissing the feature request altogether - possibly to make your "completed feature requests" statistics look better. 

Since I seem to be the only one still fighting for this I suppose the other voters have moved on to other, more mature, UI tool sets - and I guess I should too. 

This feels like banging your head against a wall.
ADMIN
Telerik Admin
Posted on: 11 Apr 2014 11:31
Tomas, since this is rather a variation of the original proposition in this entry, I would recommend you to request the needed example/feature via our support system on telerik.com. 

Thus it will be reviewed and addressed by my colleagues from Kendo UI engineering team. Thank you for your understanding.
Tomas
Posted on: 04 Apr 2014 18:19
@Kenshin: While I appreciate your efforts to try and help, the new example you've provided is still not relevant.

That example still makes multiple recursive http requests to fetch the tree structure, it just does it right away and doesn't wait until the user clicks to expand a branch. This will be way too slow for large and deeply nested tree structures with many branches.

The example is overly simplified and only nests three levels deep, using "only" three ajax calls to fetch all the data, which makes it seem reasonably responsive. During the test I just performed each ajax call took about 150 ms. Imagine a tree with 100 branches (for example a folder structure with 100 folders). It's a fairly big tree, but not very large and definitely not an unlikely scenario in a real world application. Extrapolating from your demo, this tree would take about 15 seconds to load. This is insane. I think a performance of 300 - 400 ms would be reasonable to expect from a single, larger ajax request.

The Hierarchical Data Source can obviously be populated with a complete javascript tree structure when used with local data. So it seems to me that it wouldn't be too much work to make it work with remote json data too. You just need to implement and document it, and I really hope you do.

Thanks
ADMIN
Telerik Admin
Posted on: 04 Apr 2014 16:34
Sean & all - I think this is supported if you retrieve and pass the entire set of data to the hierarchical data source. You can validate it on the following demo:
http://demos.telerik.com/kendo-ui/web/treeview/local-data.html

@Tomas: Apologies if my post was not accurate for your scenario with remote data. This should again be possible if you set loadOnDemand = false for the treeview, as in the following demo:

http://trykendoui.telerik.com/@korchev/AToV

Let me know if I am missing something obvious.
Tomas
Posted on: 02 Apr 2014 22:10
Could you please re-open this issue until it is actually resolved?
Tomas
Posted on: 01 Apr 2014 16:59
Kenshin, that example is using local data. Please provide a full and working example that uses remote data. 

Also, please don't mark things as completed when you only "think [a feature] is supported", without actually knowing for sure. This is an important issue. I have no use for KendoUI until the issue is actually resolved with a robust and supported solution.
Imported User
Posted on: 16 Jul 2013 11:38
if this problem is still not figured out, i would try another treeview solution like jqTree
Imported User
Posted on: 03 Apr 2013 03:28
Totally agree, the flexibility to preload a subset of tree is very useful. 
Imported User
Posted on: 04 Sep 2012 03:43
I agree -- as it stands, the HierarchicalDataSource isn't very Hierarchical, is it?? I have a full JSON object (Retrieved via a single ajax call, no need for multiple requests) that is n levels deep, I want to be able to bind to a tree view.

Seems like a simple use case, but Kendo needs a bit more training before it can be a master...