I need to set a value to a cell ("TotalCol") when user uncheck another cell ("UseCol") in the same row. I am using GridEditMode.Row. How to do it? I don't want to force user to change focus to another row or cell to make it work. Thanks.
By the way, everything should be recorded in the transactionlog! ;)
Sorry friend for the late reply, would you check your proposed code? ProductNumber is never changed to "111111111" after I check the box. Thanks again.
Hello Luis,
Thank you for using our forum.
If you don't want to force the user to do anything then my suggestion is to attach a delegate to the checkbox element and from there to handle the cell updating. I have created a sample for you that is showing this approach.
http://jsfiddle.net/e7aLtzt4/4/show/
Code snippet:
$("#grid").on( "click",$($($( ".ui-iggrid-editingcell" ).find(".ui-igcheckbox-small")[0]).find("span")), function() { setTimeout(function(){ //get the row which is in editing mode var rowId = $($(".ui-iggrid-editingcell").parent()[1]).attr("data-id"); var row = $("#grid").igGrid("rowById", rowId);
//or directly perform cell changing $("#grid").igGridUpdating("setCellValue", rowId, "ProductNumber", "111111111"); }, 100); });
Let me know if I may be of further assistance.