Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2745
igGrid checkbox editor change event
posted

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!

Parents
  • 3595
    Verified Answer
    posted

    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.

    json-bindingCheckboxCheck.zip
Reply Children