Filter Column Template

3 posts, 1 answers
  1. Milan
    Milan avatar
    4 posts
    Member since:
    Apr 2017

    Posted 09 May 2017 Link to this post

    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?

  2. Answer
    Georgi
    Admin
    Georgi avatar
    650 posts

    Posted 10 May 2017 Link to this post

    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.
  3. Milan
    Milan avatar
    4 posts
    Member since:
    Apr 2017

    Posted 13 May 2017 in reply to Georgi Link to this post

    Hi Georgi,

    your solution solved my problem. Thank you.

     

    Best regards,

    Milan

Back to Top