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

Filter in headers

3 Answers 663 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pankaj
Top achievements
Rank 1
Pankaj asked on 21 Oct 2016, 05:32 AM

Hi,

I have a requirement where i want to show filters in headers.

scenario : i have kendo grid with 10 columns.

first column header should appear as a dropdown in header. user can use this dropdown for filter.

second column header should appear as text box in header. user will use textbox for filter.

remaining 8 header columns should be with no filters.

please see attachment. that is exactly my header columns should look like. i.e. first two with dropdown and textbox filter and rest normal.

i have seen this example http://demos.telerik.com/kendo-ui/grid/filter-row . however in this example filter rows appear as a seperate row and not in header.

 

please guide

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 21 Oct 2016, 11:45 AM
Hi Pankaj,

You can define the grid's headers in the desired way by utilizing the widget's HeaderTemplate functionality.

For example:
http://dojo.telerik.com/@veselinar/ItorI

Regards,
Vessy
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
0
Pankaj
Top achievements
Rank 1
answered on 22 Oct 2016, 09:52 AM

Thanks for the response Vessy. Can you please also provide example where data is filtered accordingly

i.e.

1. on dropdown selection

2. on free text filter 

0
Vessy
Telerik team
answered on 25 Oct 2016, 01:34 PM
Hi Pankaj,

The Grid does not expose a method that triggers filtering outside its built-in filtering elements. Nevertheless, you can implement your custom functionality by using the datasource's filter method that allows you to perform custom data filtering.

This matter is discussed in details in the following forum thread, so you can find useful samples and suggestions in it:
http://www.telerik.com/forums/custom-filtering-7b617857877c

Regards,
Vessy
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
Grid
Asked by
Pankaj
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Pankaj
Top achievements
Rank 1
Share this question
or