【问题标题】:Kendo UI grid filter autofocusKendo UI 网格过滤器自动对焦
【发布时间】:2013-02-20 10:36:14
【问题描述】:

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

我该怎么办?

【问题讨论】:

    标签: grid kendo-ui autofocus


    【解决方案1】:

    如果你想限制过滤选项:

    • 额外添加:false
    • 仅定义所需的运算符

    代码示例:

    $('#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"
                        }
                    }
                }
            }
        ]
    });
    

    查看 Kendo UI Grid 运行演示 here
    有关示例,请参见 this 页面。

    【讨论】:

      猜你喜欢
      • 2013-06-02
      • 1970-01-01
      • 2014-02-18
      • 2018-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-02
      • 1970-01-01
      相关资源
      最近更新 更多