Hi guys,
I am adding a row in the cell save event and it gives me a following exception:
Uncaught TypeError: Cannot read property 'offsetParent' of undefined
The exception happens only when I click with mouse on another cell withing the grid. Tab is working fine.
The code is very simple:
$grid.on("pqgridcellsave", function (evt, ui) {
var newVal = ui.newVal, dataIndx = ui.dataIndx, rowIndx=ui.rowIndx;
if (newVal) {
var data = $grid.pqGrid("option","dataModel.data");
if (data) {
var rowsCount=data.length-1;
if (rowsCount == rowIndx) {
$grid.pqGrid("addRow", {rowData:{}});
}
}
}
});
Here is the call stack:
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)