How to use "e" parameter of endEdit method? Documentation says:
.igGridUpdating( "endEdit", [update:bool], [e:object] );
this example the event editCellEnded does not fire when working with new row
I am glad to hear that you find my reply helpful.
Thank you for using our products.
Thank you so much Kolev!!! now is crystal clear to me :) This is the kind of documentation I need it.
Let me know if I may be of further assistance.
Hello,
Yes, your assumption is correct, you can pass myObject to the event handler argument and access it later in editCellEnded event (which will be fired because you are passing true like a second parameter).
Code snippet:
<script> var data = [ { "ID": 1, "Name": "John Smith", "Age": 45 }, { "ID": 2, "Name": "Mary Johnson", "Age": 32 }, { "ID": 3, "Name": "Bob Ferguson", "Age": 32 }, ];
$(function () { $("#grid").igGrid({ primaryKey: "ID", dataSource: data, //JSON Array defined above features: [ { name: "Updating", enableAddRow: true, editMode: "cell", enableDeleteRow: false, enableAddRow: false, editCellEnded: function(evt, ui){ alert("editCellEnded");
//evt.originalEvent will return you the object } } ] }); }); function StartEdit() { $("#grid").igGridUpdating("startEdit", 1, 1); } function EndEdit() { var car = { type:"VW Golf", model: 4, color: "silver"}; $("#grid").igGridUpdating("endEdit", true, car); } </script>