I use CheckboxSelectionModel as a table column with checkboxes. The column should show which panels are actually visible in the main panel and the user can check or uncheck the visibility of the panels with these checkboxes.

The method createStoreForSelection() provides a data store which contains the attributes 'widgetName' (String) and 'visible' (boolean). The data in this store are correct when I write them on the console, but all the checkboxes in the checkbox column are empty.

Does anyone know how to make ext js read and show in the checkbox the data from the data store?
I haven't found any examples showing how to set the checkboxes from data store in CheckboxSelectionModel


Here is the code:

Code:
    var cbxSelModel = new Ext.grid.CheckboxSelectionModel({
        checkOnly: false,
        singleSelect: false,
        sortable: false,
        dataIndex: 'visible',
        width: 20,
        listeners: {
            selectionchange : function(selModel) {
            },
            scope: this
        }
    });

    var selectionPanel = new Ext.grid.GridPanel({
        store: createStoreForSelection(),
        selModel: cbxSelModel,
        height: 380,
        columns: [
            { 
                header: 'col1',
                dataIndex: 'widgetName',
                sortable: false,
                width: 280,
                fixed: true
            },
            cbxSelModel
        ]
    });