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! ;)
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.
By the way, this is the error message I got with your code:
Uncaught Error: The specified record or property was not found in the data source.infragistics.lob.js:485 $.widget.setCellValuejquery-ui.min.js:5 (anonymous function)jquery-ui.min.js:5 (anonymous function)jquery-1.9.1.min.js:3 b.extend.eachjquery-1.9.1.min.js:3 b.fn.b.eachjquery-ui.min.js:5 t.widget.bridge.t.fn.(anonymous function)test.html:49 (anonymous function)
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.