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");
}
}
}
});