jqGrid:如何在“单元格编辑"中添加一行模型? [英] jqGrid: How to add a row in "cell editing" model?

查看:206
本文介绍了jqGrid:如何在“单元格编辑"中添加一行模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将jqGrid设置为Excel样式.如果jqGrid的行不够,我可以在其上追加一行.我已经检查了维基,"addRow"方法仅在内联编辑"模型中有效.如果我调用"addrow"方法,则jqGrid将变为内联编辑"模型.

I want to make the jqGrid as Excel style. If the jqGrid's rows are not enough, I can append a row on it. I have checked the wiki, the "addRow" method is only worked in "Inline Editing" model. If I call the "addrow" method, the jqGrid will change into "inline editing" model.

我搜索了一些类似的问题,例如

I have searched some similar questions, for example here, but I didn't find any heuristic sugestion for my topic.

ps:jqGrid是否具有Excel样式的生动演示?就像 Handsontable ?

ps: Is there a vivid demo of jqGrid as Excel style? Just like a Handsontable?

谢谢!

推荐答案

我不确定我是否正确理解您.我不明白您在"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.

这篇关于jqGrid:如何在“单元格编辑"中添加一行模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆