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!
Hello Daniel,
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;
if ($(this).find('.ui-igcheckbox-small-off').length > 0) {
$("#lastEditedBoolVal").text(false);
} else {
$("#lastEditedBoolVal").text(true);;
}
})
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.
I am following up check if you have any further questions. If so feel free to contact me.