0

使用剑道网格时,打开过滤器选项将使第一个操作员焦点。我知道这在有多个运算符时很有用,但我只允许包含运算符,因此希望第一个值框具有焦点。

我该怎么办?

4

1 回答 1

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.

于 2013-11-16T09:40:35.157 回答