Hi All:
I have a problem that I am trying to resolve. Please help me out here. Thanks in advance.
I want to build two features into the tool bar, one is search panel,
https://demos.telerik.com/kendo-ui/treelist/search-panel
the other one is Add New Record button
https://demos.telerik.com/kendo-ui/treelist/editing-popup
Both if them have completely different syntax, and if I do this in the treelist it won't work.
toolbar: ["kendo.template($("#region").html())", "create"],
Can you guys help me out on how I can get these two functions in the same tool bar please? Thanks.
5 Answers, 1 is accepted
Hello, Randy,
The example that you have given with the popup editing as well as the search toolbar options have the same syntax so you can enable them by using this:
Example: https://dojo.telerik.com/@bubblemaster/EtefUGiK
toolbar: [ "create", "search" ],
In case you would like a custom syntax, then use the same approach of providing a template as demonstrated in this forum thread:
https://www.telerik.com/forums/search-panel-and-toolbar-template#0ijru8paOkCBDfAt0n8YIg
Regards,
Alex Hajigeorgieva
Progress Telerik
Hi, Ridwan,
The search panel works like the filter does, if you are seeing one row, then probably the expression does not match any other rows.
For example, if you test the official demo with the search term architect, you get the parent and children:
https://demos.telerik.com/kendo-ui/treelist/search-panel
In case you have something else in mind, can you share and example and the steps with explanation of expected vs current outcomes so I can review it.
Look forward to hearing back from you.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Alex,
Thank you. I got working.
In your example, if I search for Daryl, grid does not show children associated with it. Is this possible show the children associated with Daryl?
Regards.
Ridwan.
Hi, Ridwan,
The filter shows only the records that meet the filter condition and their parent records so they can be displayed.
If you wish to show all the children associated with the matched filter, then you can do that using their parentId fields to apply another filter programmatically. Only when the child records meet a filter condition they can be a part of the displayed result set.
Specifically for Daryl, it is the only root in the example and including the children would mean to just leave the TreeList as is - and not filter it at all.
I created a Dojo for your reference that shows how to add and remove the children from the TreeList filter result set.
https://dojo.telerik.com/@bubblemaster/ozAqAGUG
I hope this helps.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.