How do I subscribe to the change event of a rendered checkbox on a grid?http://es.infragistics.com/community/forums/p/78170/395088.aspx
I need to call a function whenever something is set to true. When would be the most appropriate way to check for this? The cell editended/ing events are too late. It has to be when the value changes.
Thanks!
Hi Dimka,
I have been looking at various support links regarding checkboxes in the igGrid and have tried your attached solution in IE11. First time I click on the checkbox the function doesn't actually run, I presume because it hasn't been assigned yet, i.e in the console the log message "in fn" doesn't appear to being with.
cell.click(function () {
console.log("in fn");
//debugger;
if ($(this).find('.ui-igcheckbox-small-off').length > 0) {
console.log("false");
$("#lastEditedBoolVal").text(false);
} else {
console.log("true");
$("#lastEditedBoolVal").text(true);;
}
})
Is there a way around this?
That works thanks!
Hello Daniel,
I am following up check if you have any further questions. If so feel free to contact me.
Thank you for your patience.
A possible solution for this issue is handling the cell’s editor click event:
features: [{
name:'Updating',
editMode:'cell',
editCellStarted: function(evt, ui) {
if ( ui.columnKey === "BoolCol") {
var cell = ui.editor;
cell.click(function() {
debugger;
The current implementation works both for scenarios when new rows are being added and for cases when existing ones are being edited. It is also not necessary to exit edit mode.
The whole working sample is attached for your reference.
Please let me know if this helps. If any further questions arise don’t hesitate to contact us again.