0

When using Kendo grids, opening the filter options will give the first operator focus. I understand this I useful when there is multiple operators but I only allow the contains operator so would like the first value box to have focus.

How would I go about this?

Tim Blackwell
  • 699
  • 1
  • 7
  • 18

1 Answers1

0

If you want to limit the filter options:

  • Add extra: false
  • Define only the operators you want

Code example:

$('#grid').kendoGrid({
    dataSource: dataSource,
    height: '240px',
    columns: [
        { field: 'Id' },
        { field: 'Number', title: 'Employee #' },
        { field: 'First', title: 'FirstName' },
        { field: 'LastName', title: 'LastName' },
        {
            field: 'FunctionCode', title: 'Function', filterable: {
                extra: false,
                operators: {
                    string: {
                        eq: "Is equal to",
                        neq: "Is not equal to"
                    }
                }
            }
        }
    ]
});

See Kendo UI Grid running demo here.
And see this page for an example.

Stef Heyenrath
  • 9,335
  • 12
  • 66
  • 121