I recommend you to use to use custom formatter or register your custom formatter like it's described in the answer or in this one and call the original custom formatter inside of it:
(function ($) {
"use strict";
$.extend($.fn.fmatter, {
yourFormatterName: function (cellValue, options,
rowObject, action) {
// call formatter: "checkbox"
return $.fn.fmatter.call(this, "checkbox",
cellValue, options, rowObject, action);
}
});
$.extend($.fn.fmatter.yourFormatterName, {
unformat: function (cellValue, options, elem) {
var cbv = (options.colModel.editoptions != null &&
typeof options.colModel.editoptions.value === "string") ?
options.colModel.editoptions.value.split(":") :
["Yes","No"];
ret = $("input", elem).is(":checked") ? cbv[0] : cbv[1];
}
});
}(jQuery));
In the way you can change any property of options.colModel
before calling the original formatter:
yourFormatterName: function (cellValue, options, rowObject, action) {
var myValue = true, // or false value DYNAMICALLY
newOptions = $.extend(true, {
colModel: { formatoptions: { disabled: myValue } }
},
options);
return $.fn.fmatter.call(this, "checkbox", cellValue, newOptions, rowObject,
action);
}
where