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

Customise Filter Options in Grid

1 Answer 358 Views
Grid
This is a migrated thread and some comments may be shown as answers.
S
Top achievements
Rank 1
S asked on 08 Feb 2012, 12:17 PM
Can you please give me some example code examples for customising the Filter pop up on a grid.

For example we would like to remove the 'Ends With' option from the first drop down and also is it possible remove the second part of filter argument e.g - remove the AND and second drop down on some of columns. Obviously some colums will be different.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Feb 2012, 04:12 PM
Hello,

 Here is how to do that:

$("#grid").kendoGrid({
    filterable: true,
    columns: [
        { 
            field: "firstName",
            title: "First Name",
            filterable: {
                extra: false, //do not show extra filters
                operators: { // redefine the string operators
                    string: {
                       eq: "Is Equal To",
                       neq: "Is Not Equal To",
                       startswith: "Starts With",
                       contains: "Contains"
                    }
                }
            }

        },
        { 
            field: "lastName",
            title: "Last Name"
        }
    ],
    dataSource: [
        { firstName: "John", lastName: "Doe" }
    ]
});

And here is a live demo: http://jsbin.com/otiqug/edit#preview 

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
S
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or