简体   繁体   中英

How do I add confirmation to YesNoCheckboxCellEditor in slickgrid?

I have a checkbox field in slickgrid that uses YesNoCheckboxCellEditor and wants user to confirm the change. I have tried adding vildator:myMethod to it but with no success.

My guess is that you have to modify this function

this.applyValue = function (item, state) {
                item[args.column.field] = state;
            };

in your editor. So you just put whatever conditional logic you need and then apply value if needed.

this.applyValue = function (item, state) {
         var applyValue = (...<your logic goes here>...);
         if (!!applyValue){          
             item[args.column.field] = state;
         }
};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM