0
votes

I've been wrestling with how to make the column show as a checkbox (non-editable one).

Any Suggested code for the renderer? Seems like there should be a simple config option, but I can't find it.

 Ext.define('AEDT.view.EmailListByAddressEntry', {
     extend: 'AEDT.view.ui.EmailListByAddressEntry',
     alias: 'widget.emaillistbyaddressentry',

     initComponent: function () {
         var me = this;
         me.callParent(arguments);
     },

     onCheckBoxWhilteListOnlyChange: function (field, newValue, oldValue, options) {
         //debugger
         if (newValue) {

             this.store.filter("WhiteList", true);
             store.filter();
         } else {
             this.store.clearFilter();
         }
     },
     onBooleancolumnRender: function (abstractcomponent, options) {

     }
 });
2

2 Answers

1
votes

I noticed your comment on the Ext.grid.column.Boolean page. Anyway, the description of the renderer config states that the return value is "a HTML string to be rendered". So it seems to me that the following should work (simplified for brevity):

renderer: function(value) {
    var text = '<input type="checkbox" disabled="disabled"';
    if(value) {
        text += ' checked="checked"';
    }
    return text + '/>';
}