我正在使用 Paramquery 网格,我需要将新行添加到详细信息网格,新行应该添加到当前行的子行。我试过这个:
toolbar: {
items: [
{
type: 'button', icon: 'ui-icon-plus', label: 'New', listener:
{
"click": function (evt, ui) {
debugger;
var $gridDet = $("#grid_editing").pqGrid("option", "detailModel");
//append empty row at the end.
var rowData = { ID: "2", 'Name':'Has'}; //empty row
var rowIndx = $gridDet.pqGrid("addRow", { rowData: rowData, checkEditable: true });
$gridDet.pqGrid("goToPage", { rowIndx: rowIndx });
$gridDet.pqGrid("editFirstCellInRow", { rowIndx: rowIndx });
}
}
}
]
抛出错误:$gridDet.pqGrid 不是函数(以 rowIndx 开头的行抛出错误)
请检查下图以查看 mygrid 结构。