Filter Column Template

1 Answer 4038 Views
Grid
Milan
Top achievements
Rank 1
Milan asked on 09 May 2017, 11:26 AM

Hello,

I'm trying to replace filter widget in filter row in grid and detail grids.

My replacement should be standard text box input: <input class="k-input" id="fullName" style="width: 100%;" placeholder="Hledat subjekt">

It would be perfect if i can set template of this filter cell when defining columns like this:

columns: [
            {
                field: "color",
                filterable: {
                    cell: {
                        template: <input class="k-input" id="fullName" style="width: 100%;" placeholder="Hledat subjekt">
                        },
                        showOperators: false
                    }
                }
            }

I'd like to define it by html element or by kendo element if there is such (i have not found any)

Can you help me with solution please?

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 10 May 2017, 02:53 PM
Hi Milan,

Please check out the following example in the link bellow that illustrates how to add custom template to your filter input field.


Note that the template property expects a function. You can use the argument of the function to get reference of the input element and customize it as required.

In the link bellow I created a dojo example with custom template matching your requirements.



Regards,
Georgi
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Milan
Top achievements
Rank 1
commented on 13 May 2017, 12:05 PM

Hi Georgi,

your solution solved my problem. Thank you.

 

Best regards,

Milan

Tags
Grid
Asked by
Milan
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or