An error was thrown when I used the detailmodel
There is no problem opening the current page and clicking details. But when I switch to another page, and then switch back, there will be an error whit throw -150 , the code is as follows
var option = {
width: '100%',
height:$(window).height()-190,
dataModel: dataModel,
pageModel: pageModel,
sortModel: sortModel,
colModel: colModel,
trackModel: {on: true},
fillHandle: "",
scrollModel: { autoFit: false },
autoRowHead: false,
showTop: false,
wrap: false,
freezeCols: 4,
flexHeight: false,
numberCell: { show: false },
virtualX: false,
virtualY: false,
searchFormId: "#searchForm",
selectionModel: {type: 'cell', toggle: true, mode: "range"},
sorter: [ { dataIndx: 'recUpdDt', dir: "down" }],
detailModel: {
collapseIcon: "ui-icon-plus",
expandIcon: "ui-icon-minus",
//height: 200,
init: function (ui) {
var rowData = ui.rowData;
var rowIndx = rowData.pq_ri;
var detailobj = gridDetailModel( $(this).pqGrid('instance'), rowData.dipProductPriceLimDtls, rowIndx); //get a copy of gridDetailModel
var $grid = $("<div></div>").pqGrid( detailobj );//init the detail grid.
return $grid;
}
},
cellClick: function (event, ui) {
currPriceTableRowData = JSON.parse(JSON.stringify(ui.rowData))
},
editorEnd:priceTableEditorEnd
};
function gridDetailModel( gridMain, rowData, parentRowIndex){
return {
colModel: [
***
],
width: '80%',
height: 190,
freezeCols: 2,
autoRowHead: false,
scrollModel: { autoFit: true },
numberCell: { show: false },
trackModel: {on: true},
selectionModel: {type: 'cell', toggle: true, mode: "single"},
dataModel: {data: rowData, recIndx: "dipProductPriceLimDtlUuid"},
virtualX: false,
virtualY: true
};
}
What should I do to solve this problem,thinks.