Posted 26 April 2018, 2:51 pm EST
Hi All,
I’m facing a problem with Wijmo FlexGrid. I developed my own undo code (based on the same Flexsheet behaviour) but for one specific case is not working properly.
My grids have the new entry row added at the bottom.
When I select all rows and press Del, to clear the values, the following error is being caught: “Cannot read property ‘dataItem’ of undefined”@ selectedItems (wijmo.grid.js:13)
The main reason is because the code is trying to retrieve the value of an empty row
for(var e=this.selectedRows,t=0;t<e.length;t++)e[t]=e[t].dataItem
This is preventing my code to continue.
Also, I have another problem: assuming this bug works, still, using Del to clean the values do not trigger the rowEditStarted event, but triggers the rowEditEnded. Seems to be a bit silly, because it fires the cellEditStarted (but I can’t use this one).
Do you have a reason for not trigger both?
Thanks,