ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: francis on May 17, 2021, 06:33:24 pm
-
Hi,
I'm stuck while using the example snippet of the [Nesting with lazy loading], and it comes up with the error as below
Everything runs well but the detail section shows once just before the error happened and vanished at the 2nd click.
How to fix it? Thanks in advance.
Uncaught Error: no such method 'instance' for pqGrid widget instance
jQuery 5
renderView http://localhost:8080/eIMS/grid/pqgrid.min.js:13
refreshRow http://localhost:8080/eIMS/grid/pqgrid.min.js:20
refreshRow http://localhost:8080/eIMS/grid/pqgrid.min.js:20
refreshRow http://localhost:8080/eIMS/grid/pqgrid.min.js:11
softRefresh http://localhost:8080/eIMS/grid/pqgrid.min.js:13
rowExpand http://localhost:8080/eIMS/grid/pqgrid.min.js:13
rowExpand http://localhost:8080/eIMS/grid/pqgrid.min.js:12
toggle http://localhost:8080/eIMS/grid/pqgrid.min.js:13
n http://localhost:8080/eIMS/grid/pqgrid.min.js:9
_trigger http://localhost:8080/eIMS/grid/pqgrid.min.js:9
_onClickCell http://localhost:8080/eIMS/grid/pqgrid.min.js:10
_create http://localhost:8080/eIMS/grid/pqgrid.min.js:10
jQuery 8
_create http://localhost:8080/eIMS/grid/pqgrid.min.js:10
jQuery 2
_create http://localhost:8080/eIMS/grid/pqgrid.min.js:12
jQuery 2
_createWidget http://localhost:8080/eIMS/grid/pqgrid.min.js:10
jQuery 6
grid http://localhost:8080/eIMS/grid/pqgrid.min.js:12
grid http://localhost:8080/eIMS/grid/pqgrid.min.js:19
show http://localhost:8080/eIMS/scripts/pqexplorer.js:163
jQuery 18
<anonymous> http://localhost:8080/eIMS/scripts/pqexplorer.js:32
jQuery 8
------------------------------
Version used
jQuery : 1.8.3
jQuery UI: 1.12.1
The code:
var objA=function(gridMain, rowData){
return {
columnBorders: false,width: "flex",height:"flex",
showTop: false,showBottom: false,
sortModel: {sorter:[{dataIndx:'SequenceNumber', dir: "up"}]},
dataModel: {dataType: "jsonp",location: "remote",method: "GET",
error: function () {gridMain.rowInvalidate({ rowData: rowData });},
getUrl: function(){return {url:"xxxxx", data:"orderId="+rowData.OrderID}}
},
colModel: [
{ title:"",width: 85,dataType:"string",dataIndx:"SequenceNumber" },
{ title:"",width: 95,dataType:"string",dataIndx:"Description" },
{ title:"",width:150,dataType:"string",dataIndx:"Unit"},
{ title:"",width:100,dataType:"float", dataIndx:"UnitPrice",align: "right"},
{ title:"",width: 85,dataType:"float", dataIndx:"Quantity", align: "right"},
{ title:"",width: 80,dataType:"float", dataIndx:"Amount", align: "right"},
],
height: 'flex',
numberCell: { show: false },
title: "Order Details"
};
}
function initDetail(ui){
var rd = ui.rowData;
var detailobj = objA(this,rd); //get a copy of gridDetailModel
var $grid = $("<div></div>").pqGrid(detailobj); //init the detail grid.
return $grid;
}
var objB = {
........
colModel:.....,
dataModel: ......
detailModel:{cache:true,
collapseIcon:"ui-icon-plus",
expandIcon:"ui-icon-minus",
init:initDetail,
};
$grdB=pq.grid("#divBList",objB) <----- this is the line 163 of error message above (show http://localhost:8080/eIMS/scripts/pqexplorer.js:163)
Francis
-
Francis
Could you please mention version of pqgrid and share a jsfiddle or stackblitz if possible.
-
The version of pqgrid applied is [ParamQuery Pro v7.5.0]
I'm preparing the jsfiddle and will tell you once I have it done.
Thanks for your replay