I'm using jqGrid PHP. When adding a new row (inline mode), how can I pre fill the new row using the same cell data with the last selected row? Thanks so much.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use a global variable to get the values from last selected row in onSelectRow event like this.
var lastsel= jQuery('#grid').jqGrid('getGridParam','selrow');
Now while adding a new row you can use addRowData like this
$("#grid").addRowData(rowid,data, position, srcrowid);
where data, you can get from lastsel var.
See this for further reference.