When data is copied from Excel and pasted into pqGrid, it is displayed as ‘#VALUE!
beforeValidate: function (evt, ui) {
if (ui.source === "paste") {
const grid = this;
// Block all new row additions on paste
ui.addList.length = 0;
// Loop through updated rows
ui.updateList.forEach(({ newRow, rowData }) => {
for (const dataIndx in newRow) {
if (!newRow.hasOwnProperty(dataIndx)) continue;
const col = grid.getColumn({ dataIndx });
console.log(col, "=rowData-paste");
const elementType = rowData?.ElementType;
let val = newRow[dataIndx];
console.log(val, "=paste-value");
// output #VALUE!
}
});
}
}