Search code examples
extjsextjs3

How to add a checkbox column in a gridpanel in ExtJS3.4


want to add a checkbox column in a gridpanel this.

I tried this.

var sm = Ext.create('Ext.selection.CheckboxModel'); 

and in grid I am configuring this. selModel: sm,

Can any one help me in this.


Solution

  •     Please follow this code
        I am sure this code is working fine.
    
         var sm = new Ext.grid.CheckboxSelectionModel({
                    width: 25,
                    singleSelect: true,
                    header: ''
                });
    
    
         xtype: 'grid',
         sm: sm,
         store: store,
         trackMouseOver: true,
         cm: new Ext.grid.ColumnModel({
         defaultSortable: true,
             columns: [
                  sm,
              { dataIndex: 'record', header: 'Record' },
    
    
                          ]
    })