Hi Team,
When I have implemented PQ grid on my project its working fine for other functionality but when I have created new product by clicking on new product button the new row is inserted in grid and first cell showing in edited form its working fine but when i have changed edited cell to something different its getting issue Cannot read properties of undefined (reading 'pq_hidden')
below is the code
This is working with grid.editFirstCellInRow({ rowIndx: ri }); After try to remove the row
{
type: 'button', icon: 'ui-icon-plus', label: 'New Product', cls: 'newProductBtn', listener: function () {
if (checkUserSessionActive()) {
var grid = this;
var len = PhQty === undefined ? 1 : PhQty;
newRows = pqVS.data.filter(function (value) {
return value.deleteOption == true;
});
newRowsCount = parseInt(newRows.length) + parseInt( len);
if (newRowsCount<= 200) {
for (let i = 0; i <= len - 1; i++) {
var obj = grid.getViewPortIndx(),
initV = obj.initV;
//append empty row at beginning of viewport.
rowData = { "state": true, "RLSKU":0, "deleteOption": true, "newRow": true } //empty row
var ri = grid.addRow({ newRow: rowData, checkEditable: true, rowIndx: initV });
grid.scrollRow({ rowIndxPage: ri }, function () {
grid.editFirstCellInRow({ rowIndx: ri });
});
}
}
}
}
}
This code is getting issue with grid.editCell({ rowIndx: ri, dataIndx: "CITEMD" }) After try to remove the row
{
type: 'button', icon: 'ui-icon-plus', label: 'New Product', cls: 'newProductBtn', listener: function () {
if (checkUserSessionActive()) {
var grid = this;
var len = PhQty === undefined ? 1 : PhQty;
newRows = pqVS.data.filter(function (value) {
return value.deleteOption == true;
});
newRowsCount = parseInt(newRows.length) + parseInt( len);
if (newRowsCount<= 200) {
for (let i = 0; i <= len - 1; i++) {
var obj = grid.getViewPortIndx(),
initV = obj.initV;
//append empty row at beginning of viewport.
rowData = { "state": true, "RLSKU":0, "deleteOption": true, "newRow": true } //empty row
var ri = grid.addRow({ newRow: rowData, checkEditable: true, rowIndx: initV });
grid.scrollRow({ rowIndxPage: ri }, function () {
grid.editCell({ rowIndx: ri, dataIndx: "CITEMD" })
});
}
}
}
}
}