Hi,
A sinlge column is editable on my igGrid. After editing the cell value if I click on the Grid then cell value gets updated but if I click on outside the grid then cell value does not update. On iggridupdatingeditcellended I wrote "ui.update;" which is also returing false.
I want the grid should update the value on edit cell end. Could you please help.
Thanks.
Hello Manju,.
In order grid cell to be updated, it should lose focus which means to exit edit mode of the respective cell editor. If you click outside the grid while you're currently editing some cell, its value won't be updated until you click somewhere inside the grid. You can handle editCellEnded event to keep track of the cell value after editing, but this event will raise also when you click within the grid, not outside of it. If you have further questions, please let me know.
Regards,Tsanna
Tsanna,
Shouldn't there a way to setup a leave event on the grid and when that event is triggered tell the grid to stop editing so that the cell gets updated?
We got this working. Thanks!
Hello,
There is no event that achieves this requirement consistently between applications and browsers. The closest and most straightforward solution is to attach a "click" handler to the document and if the event's target is not part of the grid, call endEdit with true as the first argument (forcing Updating to accept any changes done). However, this solution fails if the click event cannot bubble to the element the handler is attached to. This may happen when clicking inside a control that has internal logic that cancels the propagation or when running it on Safari where events don't bubble to the document's body (and therefore to document either). The latter can be worked around in most cases if the whole page is wrapped in a DIV which can then be used to bind the click event to.
I hope this helps! Please, let me know if you have any other questions or concerns!
Best regards,
Stamen Stoychev