How can i change the default behaviour to cancel the edit event if a user clicks on another row after initiating a change to some cells on a row?
Hello,
My suggestion is to handle the igxGrid's onCellEditEnter event and check whether the selected cell's row is currently in edit mode and if it is not to call the grid's endEdit method. This method finishes the row transactions on the current row and if we pass false as argument, the new value would not be committed.
cellEditEnter(event:any){ const row = this.grid1.getRowByIndex(event.cellID.rowIndex); if (!row.inEditMode) { this.grid1.endEdit(false); } }
Here could be found a simple sample that demonstrates this approach.
Please test it on your side and let me know if I may be of any further assistance.
Sincerely,
Teodosia Hristodorova
Associate Software Developer
Thank you for getting back to me with a suggestion.
What i was more interested in was not a celledit but for a RowEdit ( [rowEditable]="true" ). Will you be able to give me any suggestions on that?
Regards,
Ramireddy