Grid Filters

1 Answer 10 Views
Grid ToolBar
Emna
Top achievements
Rank 1
Emna asked on 11 May 2022, 09:17 AM

<ng-template kendoGridToolbarTemplate>
                            <input [style.width.px]="165" placeholder="Containing" kendoTextBox (input)="onFilter($event)"/>
                            <input [style.width.px]="165" placeholder="Name" kendoTextBox (input)="onFiltermethode($event)"/>
                               
                            
</ng-template>

so i followed this method : https://stackblitz.com/edit/angular-usz2zq?file=src%2Fapp%2Fapp.component.ts , and  tried to create a grid .

Then i wanted to create 2 external filters( you'll find code below code below ) , however,  they work independently, which means that i can't use both filters in the same time.

For example if i want to filter those with the name is "Eric" and  job title " Librarian" , the result won't be the combination of the two filters but only the result of the last one.

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Yanmario
Telerik team
answered on 16 May 2022, 06:24 AM

Hi Emma,

Thank you for the provided details.

I am not sure how the second input field filtering is implemented, but it should consider the value from the first filter to the specific field. Each input should filter a specific field inside the Grid as demonstrated in the following example:

https://stackblitz.com/edit/angular-kae3yq?file=src%2Fapp%2Fapp.component.ts

It is worth mentioning that the value of the first input field is saved so that it can be applied when the user uses the second input to filter by job title. I would also recommend checking out external filtering with our Filter component:

https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/external-filtering/#toc-using-the-filter-component

I hope this helps.

Regards,
Yanmario
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Emna
Top achievements
Rank 1
commented on 16 May 2022, 01:21 PM

Thanks a lot!

 

Tags
Grid ToolBar
Asked by
Emna
Top achievements
Rank 1
Answers by
Yanmario
Telerik team
Share this question
or