ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: stoodin on April 18, 2014, 12:31:31 am
-
Hi guys,
I have a custom drop down editor that works just fine, however when I select first time the value in the cell and then click with the mouse on the next cell I am getting an error:
Uncaught TypeError: Cannot read property 'offsetParent' of undefined pqgrid.min.js:9
g._generateCellRowOutline pqgrid.min.js:9
(anonymous function) jquery-ui-1.10.4.custom.js:401
g._editCell pqgrid.min.js:9
(anonymous function) jquery-ui-1.10.4.custom.js:401
g.editCell pqgrid.min.js:9
(anonymous function) jquery-ui-1.10.4.custom.js:401
(anonymous function)
It happens only first time and only on the mouse click. It is not visible from the user. Just an exception in console.
Tab and Enter work fine.
Any idea what I am doing wrong?
-
Could you provide a small test case so that the issue can be reproduced.
-
The error happens when I try to add a new row like this:
$grid.on("pqgridcellsave", function (evt, ui) {
var newVal = ui.newVal;
var dataIndx = ui.dataIndx;
var rowIndx=ui.rowIndx;
if (newVal) {
var newVal = ui.newVal, dataIndx = ui.dataIndx, rowIndx=ui.rowIndx;
if (newVal) {
var rowsCount=$grid.pqGrid("option","dataModel.data").length-1;
if (rowsCount == rowIndx) {
console.log("Step 1");
$grid.pqGrid("addRow", {rowData:{recordID:'',type:'',sun_st:'',sun_end:'',mon_st:'',mon_end:''}});
console.log("Step 2");
// $grid.pqGrid("refreshRow", rowIndx+1);
// console.log("Step 3");
}
}
}
});