Tag Archives: checkboxselectionmodel

ExtJS: CheckboxSelectionmodel

An ExtJS gridpanel can be extended with checkboxes so it is visual which rows are selected.

Therefor the default selectionmodel of the GridPanel should be replaced with the Ext.grid.CheckboxSelectionModel.

var checkboxselection = new Ext.grid.CheckboxSelectionModel({
    singleSelect: true,

Then this object is add on two different place to the GridPanel. Don’t forget the one in the column configuration, this will be the place where the actual checkboxes are coming.

var grid = new Ext.grid.GridPanel({
    store: store,
    loadMask: true,
    selModel: checkboxselection,
    columns: [
       {header: 'Id', sortable: true, renderer: 'string', dataIndex: 'id' },
       {header: 'Name', sortable: true, renderer: 'string', dataIndex: 'name'}

Continue reading ExtJS: CheckboxSelectionmodel