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

For TreeList how can I have build in search function bar and "Add New Record" Button at the same time

5 Answers 302 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 25 Jan 2020, 02:31 AM

     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

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 28 Jan 2020, 01:08 PM

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

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
Ridwan
Top achievements
Rank 1
answered on 21 Apr 2020, 03:34 PM
i am using the builtin search. When i search i want to be able to show the parent and children as well. Is this possible. The search currently only shows a single row. 
0
Alex Hajigeorgieva
Telerik team
answered on 23 Apr 2020, 01:28 PM

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

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.
0
Ridwan
Top achievements
Rank 1
answered on 24 Apr 2020, 12:28 AM

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.

0
Alex Hajigeorgieva
Telerik team
answered on 27 Apr 2020, 04:31 PM

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

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.
Tags
TreeList
Asked by
Randy
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Ridwan
Top achievements
Rank 1
Share this question
or