1
votes

I have a checkbox selection model that I am using on a gridpanel. I have configured the CheckboxModel like so:

Ext.create('Ext.selection.CheckboxModel', {
    mode: 'Single',
    checkOnly: true,
    showHeaderCheckbox: false
});

This configuration allows the user to select only one record from the gridpanel. I have removed the checkbox in the header since I want the user to have to explicitly check the box in the record row. Now I have just a blank header in that column....is there any way to add text to that header column? From what I can tell it seems like my only options are to either leave the checkbox in the header or remove it and have a blank column header...is that correct?

1

1 Answers

3
votes

You can override the getHeaderConfig method of the CheckboxModel, like:

Ext.define('Fiddle.override.selection.CheckboxModel', {
    override: 'Ext.selection.CheckboxModel',

    getHeaderConfig: function() {
        return Ext.apply(this.callParent(arguments), {
            width: 100,
            header: 'Select'
        });
    },

});

Working example: https://fiddle.sencha.com/#fiddle/1b3g