如何在 ExtJS3.4 的网格面板中添加复选框列

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

想要在网格面板中添加一个复选框列。

我试过了。

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

我正在网格中配置它。 selModel: sm,

任何人都可以帮助我解决这个问题。

    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' },


                      ]
})