且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jqGrid:如何在“单元格编辑"中添加一行模型?

更新时间:2023-02-05 15:08:05

我不确定我是否正确理解您.我不明白您在"Excel风格"下的意思.如果使用单元格编辑模式,并且需要添加一行,则可以使用 addRowData 方法.如果需要,您可以在新行上调用 editCell .您可以使用新添加的行的DOM元素的 rowIndex 属性来获取该行的索引您可以将其用作editCell的第一个参数.

I'm not sure that I understand you correctly. I don't understand what you mean under "Excel style". If you use cell editing mode and you need add a row you can use addRowData method. If required you can call editCell on the new row. You can use rowIndex property of DOM element of new added row to get the index of the row which you can use as the first parameter of editCell.