JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Cell.row is undfined in onCellUpdate
In my grid I’m using this onCellUpdate method.
onCellUpdate(cell, oldValue, value, confirm) { alert(‘AAAAAA’); let newValue = value; console.log(newValue); let row = cell.row.id; let column = cell.column.index; console.log(row + ‘/’ + column); sendDatiGriglia(newValue, row, column); confirm(true); },
Looking into the console I get an error cell.row is undefined and the grid hangs.
What’s wrong ?
Tks
Hello tbettinazzi@axioma.it,
Please, note that the first argument of the onCellUpdate callback is calls cells and it represents an array of edited cells. So you should get the row id like this: cells[0].row.id Please, check this Example.
onCellUpdate
cells
cells[0].row.id
Best Regards, Martin
Smart HTMLElements Team https://www.htmlelements.com/