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

2019-03-04 07:42发布

问题:

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!

回答1:

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