jqGrid: How to add a row in “cell editing” model?

2019-03-04 08:05发布

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: Is there a vivid demo of jqGrid as Excel style? Just like a Handsontable?

Thank you!

标签: jqgrid
1条回答
戒情不戒烟
2楼-- · 2019-03-04 08:28

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.

查看更多
登录 后发表回答