Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 剑道ui网格批量编辑,设置焦点_Javascript_Jquery_Kendo Grid - Fatal编程技术网

Javascript 剑道ui网格批量编辑,设置焦点

Javascript 剑道ui网格批量编辑,设置焦点,javascript,jquery,kendo-grid,Javascript,Jquery,Kendo Grid,我在剑道ui网格上工作。默认情况下,网格不可编辑。 工具栏中有一个“编辑”按钮。当用户单击它时,网格应该在批处理模式下可编辑,如 完成这项工作的唯一解决方案是删除并重新创建具有新属性(可编辑:true等)的网格/数据源 这正如预期的那样有效。现在,我想将焦点设置在第一行/单元格上,以便用户可以看到网格现在是可编辑的(在下面的示例中,该行成为输入字段) 有什么建议吗 这里有一个例子 $('.k-grid-edit').on('click', function (e) { e.preve

我在剑道ui网格上工作。默认情况下,网格不可编辑。
工具栏中有一个“编辑”按钮。当用户单击它时,网格应该在批处理模式下可编辑,如

完成这项工作的唯一解决方案是删除并重新创建具有新属性(可编辑:true等)的网格/数据源

这正如预期的那样有效。现在,我想将焦点设置在第一行/单元格上,以便用户可以看到网格现在是可编辑的(在下面的示例中,该行成为输入字段)

有什么建议吗

这里有一个例子

 $('.k-grid-edit').on('click', function (e) {
     e.preventDefault();

     // remove old grid
     $('#grid').html('');

     // recreate grid with edit: true and new datasource
     $('#grid').kendoGrid({
         dataSource: dataSourceInEdit,
         editable: true,
         columns: [{
             field: 'TableId',
             title: 'Id',
             width: 50
         }, {
             field: 'Area',
             title: 'Area'
         }, {
             field: 'Table',
             title: 'Table',
             width: 60
         }, {
             command: 'destroy',
             title: ' ',
             width: 100
         }]
    }).data("kendoGrid");

}); // end edit
好的,我明白了:
这两条线使它成为现实:

var grid = $("#rt_tableGrid").data("kendoGrid");
grid.editRow($("#rt_tableGrid tr:eq(1)"));
当然,只有在我当地的剧本中,我无法用小提琴演奏

尽管文档中已写入:需要“内联”或“弹出”

文档

您能为您的问题创建一个提琴吗?您提供的链接中的网格具有不同的行为@VivekParekh是否需要设置选定行中特定单元格的焦点?我该怎么做?你能帮忙吗?这不管用吗?对我来说,它选择一个特定的单元格grid.editRow($('#rtGridEdit tr:eq('+index+')));无法使用您的代码,您的意思是我必须手动指定索引吗?1=firstCell,2=secondCell。。。你到底是什么意思?啊,好吧,你说得对。你看到这个了吗?