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

Is it possible to use the treeList filter programmatically

6 Answers 443 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Gers
Top achievements
Rank 1
Gers asked on 12 Feb 2016, 04:30 PM

Is it possible to use the treeList filter programmatically ? 

For example , let's say I have a treeList with a searchBox, once the user tap something in the searchBox , I programmatically apply the filter using directly the "contains" option and show the result to the user.

6 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 16 Feb 2016, 10:05 AM

Hello Gers,

 

TreeListDataSource inherits from DataSource and as such it has the same filtering API.

 

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
Gers
Top achievements
Rank 1
answered on 16 Feb 2016, 03:35 PM

Superb !! I'm going to check that API.

Thank you Nikolay . 

0
Randy
Top achievements
Rank 1
answered on 12 Feb 2020, 10:16 PM
I just discovered a bug in the treelist. where if you set the dataSource and filter programmatically, while have a remote resource, it will only return 1 item for some reason. However if I use Grid, then I don't have any issue with that. 
0
Alex Hajigeorgieva
Telerik team
answered on 14 Feb 2020, 12:02 PM

Hello, Randy,

Are you referring to server operations - using the load on demand functionality and server filtering?

It would be most helpful if you let me know how reproduce the behaviour. If the node is collapsed and then you expand it, would one of the children meet the filter conditions?

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Gary
Top achievements
Rank 1
answered on 20 Jul 2020, 03:35 PM

Unfortunately, having a filter on the TreeList dataSource and specifying that nodes be collapsed causes the pagination to break, with the calculation of the number of pages being incorrect. Change this sample:

https://demos.telerik.com/kendo-ui/treelist/local-data-binding

... such that there is a filter on the dataSource:

filter: { field: "Position", operator: "neq", value: "Team Lead" }

... and set dataSource.schema.model.expanded: false

There will be 7 pages displayed with content in only the first.

 

0
Alex Hajigeorgieva
Telerik team
answered on 22 Jul 2020, 12:41 PM

Hello, Gary,

Thank you for pointing this out. It appears that we already have this bug logged in our repository here:

https://github.com/telerik/kendo-ui-core/issues/5491

And the same is linked in our Feedback portal and I voted on your behalf here:

https://feedback.telerik.com/kendo-jquery-ui/1447153-tree-list-shows-wrong-total-and-paging-when-we-expand-or-collapse-a-row-after-filtering

The higher the priority and severity of an issue, the sooner it is scheduled for implementation.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Tags
TreeList
Asked by
Gers
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Gers
Top achievements
Rank 1
Randy
Top achievements
Rank 1
Alex Hajigeorgieva
Telerik team
Gary
Top achievements
Rank 1
Share this question
or