javascript - 如何重新排列 KendoGrid Tab 顺序?

标签 javascript asp.net-mvc-3 telerik grid kendo-ui

我正在使用 KendoGrid 并进行内联批量编辑。只有少数几列是可编辑的。当点击选项卡时,下一列被选中,但它不是下一个可编辑的列。有没有办法控制 KendoGrid 中的 Tab 键顺序?我如何使选项卡跳过不可编辑的列?

我的加价:

<div id="employeeGoalsGrid"></div>

我的Javascript:

var goalsDataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: '/MVC/ResearcherPoints/GetEmployeeResearchers',
                type: 'POST',
                contentType: 'application/json'
            },
            update: {
                url: '/MVC/ResearcherPoints/UpdateEmployeeGoal',
                type: 'POST',
                contentType: 'application/json'
                //dataType: "jsonp"
            },
            parameterMap: function (options, type) {
                debugger;
                $.extend(options, { ID: options.id });
                return JSON.stringify(options);
            }
        },
        batch: false,
        schema: {
            model: {
                id: 'ID',
                fields: {
                    id: { editable: false, nullable: false },
                    FirstName: { editable: false, nullable: true  },
                    LastName: { editable: false, nullable: true },
                    Title: { editable: false, nullable: true },
                    TeamName: { editable: false, nullable: true },
                    PointsGoal: { type: "number", nullable: true, validation: { required: false, min: 1 } }
                }
            }
        },
        sortable: true,
        filterable: true,
        columnMenu: true
    });


    $('#employeeGoalsGrid').kendoGrid({
        dataSource: goalsDataSource,
        navigatable: true,
        sortable: true,
        resizable: true,
        toolbar: ["save", "cancel"],
        columns: [
            { field: "FirstName", title: "First Name", width: 200},
            { field: "LastName", title: "Last Name", width: 200 },
            { field: "Title", title: "Title", width: 200 },
            { field: "TeamName", title: "Team", width: 200 },
            { field: "PointsGoal", title: "Goal", width: 200 }],
        editable: true,
        filterable: true,
    });

如有任何建议,我们将不胜感激。

最佳答案

要跳过单元格,您需要使用 tabindex="99999"

我出于测试目的创建了一个 jsfiddle:http://jsfiddle.net/danieltulp/kfG7y/

我认为你需要看看 using attributes: { tabindex: "999999"} 在

{ field: "UnitsInStock", title: "Units In Stock", width: 110,  attributes: { tabindex: "999999" } }

但这似乎行不通。谁有更好的主意?

也许这是不可能的?

关于javascript - 如何重新排列 KendoGrid Tab 顺序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13499709/

相关文章:

javascript - javascript 函数中 with() 的用途

asp.net - 如何关闭radwindow管理器表单服务器端按钮单击

javascript - 如何让 jquery.Ajax 在 json 响应前面使用 "throw 1; <dont be evil>"?

asp.net-mvc - 如何在mvc中编写分页的扩展方法

jquery - InsertionMode.Replace 如何在 Ajax.BeginForm 上工作

javascript - Kendo UI - 未捕获的类型错误

javascript - 遍历 'selecting' jQuery DataTables 行

javascript - 当用户在选择器中选择类别时启用按钮

Javascript fetch Api 不起作用初学者问题

jquery - jQuery.load() 中的参数未传递给 Controller ​​操作方法