开发者

How do I add confirmation to YesNoCheckboxCellEditor in slickgrid?

开发者 https://www.devze.com 2023-02-10 01:54 出处:网络
I have a checkbox field in slickgrid that uses YesNoCheckboxCellEditor and wants user to confirm the change. I have tried adding vil开发者_开发问答dator:myMethod to it but with no success.My guess is

I have a checkbox field in slickgrid that uses YesNoCheckboxCellEditor and wants user to confirm the change. I have tried adding vil开发者_开发问答dator: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;
         }
};
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号