首页 > 代码库 > ext中设置grid单选,取消选择

ext中设置grid单选,取消选择

 

原代码(无法取消选择)如下:

selModel: Ext.create(‘Ext.selection.CheckboxModel‘, {
  mode: "SINGLE",
  allowDeselect: true,
  onHeaderClick: function (headerCt, header, e) {
  }
}),

修改后代码:

  selModel: { 
                    selType: "checkboxmodel",
                    mode: ‘SINGLE‘,
                    checkOnly: ‘true‘,
                    allowDeselect: true,
                    onHeaderClick: function (headerCt, header, e) {
                    }
                },

完美解决问题

原文:http://stackoverflow.com/questions/39616345/sencha-extjs-grid-checkbox-model-single-mode-deselect

ext中设置grid单选,取消选择