13

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

我的标记:

<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,
    });

任何建议将不胜感激。

4

2 回答 2

3

To skip cell you need to use tabindex="99999"

I created a jsfiddle for testing purposes: http://jsfiddle.net/danieltulp/kfG7y/

I think you need to look at using attributes: { tabindex: "999999" } in

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

but this doesn't seem to work. Anyone a better idea?

Perhaps this just isn't possible?

于 2013-08-28T20:19:42.747 回答
0

您可以尝试将editable网格选项上的属性从trueto更改为"inline"并告诉我是否可以解决问题吗?我在这个 JSBin中创建了一个类似的场景,当我编辑一行时,tab 顺序工作正常(OSX 上的 Chrome)。

于 2012-11-28T16:48:33.367 回答