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

Grid header filtering row that contains 1 element for each column in grid with the same width.

3 Answers 334 Views
Grid
This is a migrated thread and some comments may be shown as answers.
KorsG
Top achievements
Rank 1
KorsG asked on 07 Mar 2012, 06:02 PM
I am trying to create what I call a "header-filter-row". 

Instead of using the inbuilt filter functionality, I would like to have 1 row over or below(preferably) the column headers, that contains a filtering widget, simple textbox or just plan nothing etc.
This makes simple searching much more efficient(in my opinion) and the enduser have a better overview of what is currently being filtered. Ofcourse the inbuilt filtering is superior in more complex cases. 

Here's an example of what I would like to archive from a competitive product:
http://dhtmlx.com/docs/products/dhtmlxGrid/samples/08_filtering/06_pro_search.html 

This is what i have been able to do so far with Kendo. 
http://jsfiddle.net/cBrpn/1/ 

Here I used the toolbar template, but I don't know how to make the search elements the same width as the columns(without having to explicitly set the width). 

Can you suggest a more dynamic way to achieve my goal ?

Regarding having the "filter-row" below the headers is not my primary concern, but it would be great to have the option though :-)

3 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 08 Mar 2012, 09:22 AM
Hello,

You should append the filter row to Grid's header to align the columns, instead using the toolbar template:

var filterRow = $('<tr><td><input type="search" id="ProductIDSearchBox"/></td>' +
     '<td><input type="search" id="ProductNameSearchDD"/></td>' +
     '<td><input type="search" id="UnitPriceSearchBox"/></td></tr>');
 
grid.data("kendoGrid").thead.append(filterRow);

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
KorsG
Top achievements
Rank 1
answered on 08 Mar 2012, 02:18 PM
Hi Rosen,

This was almost too simple :-)

Thank you very much!! 


0
Sushant
Top achievements
Rank 1
answered on 14 Mar 2012, 01:25 PM
Hi There, 
I am new to Kendo UI. 
I saw grid examples. How can I enable filters there?

Thanks for reading 
Regards
Sushant Danekar 
http://Splendornet.com
Tags
Grid
Asked by
KorsG
Top achievements
Rank 1
Answers by
Rosen
Telerik team
KorsG
Top achievements
Rank 1
Sushant
Top achievements
Rank 1
Share this question
or