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

KendoTreeView search with LoadOnDemand true

3 Answers 336 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Anamika
Top achievements
Rank 1
Anamika asked on 15 Feb 2017, 12:39 PM

Hello

 

I have a treeview which is bound to remote dataset. LoadOnDemand is true so everytime a node is clicked read is called with id to load ist children.

Now i want to have  serach box where text Input should filter the treeview to all Levels.

I tried this way

http://docs.telerik.com/kendo-ui/controls/navigation/treeview/how-to/filter-out-search-results

But it does not work as expected as i believe this methos is for loadondemand false.

 

Can you please suggest a way to make it work . I Need LoadOndemand true as i have 2000+ records in tree

 

Thanks

 

Anamika

 

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 17 Feb 2017, 09:17 AM
Hi Anamika,

I am afraid that filtering and loadOnDemand true is not supported out of the box, as suggested in the following StackOverflow thread. Filtering would work only when all nodes are loaded, as mentioned in the following StackOverflow thread, which later lead to creating the help article you referenced.

And as a side note, I edited your post, as the domain of the referenced article is not the genuine Kendo UI documentation site, but an imitative one.

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Anamika
Top achievements
Rank 1
answered on 17 Feb 2017, 01:26 PM

Looks like it does work though but i do not understand after the filter Loop is finished the data read is called multiple times i think for all filtered rows. Is this normal behaviour? Does datasource.filter invokes the read??

 

Also inside the filter Loop is there a way to know the tree end is reached? As i mentioned i have over 2000 records in tree. When i give a serach criteria it really takes Long till filter Loop is finished but the filtered data is diisplayed earlier and the read opertaion is being called for all nodes. I want to Show a wait Cursor when filter Loop starts till the whole Operation finished, so that user does not try to expand node till read is not over.

 

Thans

 

Anamika

0
Dimitar
Telerik team
answered on 21 Feb 2017, 01:05 PM
Hi Anamika,

The data source filters the data items client-side unless the serverFiltering option is set to true.
As this scenario is not supported, I would suggest you to ask in the first StackOverflow thread from my previous reply about additional details how it was achieved.

As far as the loading indicator is concerned, you may use the Kendo UI progress indicator - Dojo. Note that the element, which is targeted by this indicator, should satisfy the requirements explained in the article.

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TreeView
Asked by
Anamika
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Anamika
Top achievements
Rank 1
Share this question
or