Results 1 to 2 of 2

Thread: Ext.grid.Panel allowDeselect config has no effect

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9268 in a recent build.
  1. #1
    Sencha User
    Join Date
    Feb 2011
    Vote Rating

    Default Ext.grid.Panel allowDeselect config has no effect

    REQUIRED INFORMATIONExt version tested:
    • Ext 4.2.0 rev 663
    Browser versions tested against:
    • FF18 (firebug 1.9.2 installed)
    • IE10
    • Google Chrome 25

    • Ext.grid.Panel allowDeselect config does not apply to appropriate config of Ext.selection.Model.
    Steps to reproduce the problem:
    • Create the simplest Ext.grid.Panel with allowDeselect: true config and some rows of data.
    The result that was expected:
    • The selected row should be deselected after mouse clicking on it.
    The result that occurs instead:
    • The selected row can not be deselected back.
    Test Case:
    Ext.onReady(function() {    
        var myData = [
            [1, 'Company 1'],
            [2, 'Company 2'],
            [3, 'Company 3']
        Ext.define('Company', {
            extend: '',
            fields: [
                {name: 'id', type: 'int'},
                {name: 'name', type: 'string'}
            idProperty: 'id'
        var gridStore = Ext.create('', {
            data: myData,
            model: 'Company'
        var MyGrid = Ext.create('Ext.grid.Panel', {
            allowDeselect: true,
            // selModel: Ext.selection.Model({mode: 'single', allowDeselect: true}),    // this way works!
            store: gridStore,
            renderTo: Ext.getBody(),
            columns: [
                {text: '?', dataIndex: 'id'},
                {text: 'Company name', dataIndex: 'name', flex: 1 }

    Possible fix:

    • if we create a grid with default selection model then this model will be created with allowDeselect config with default value 'false' (see Ext.Selection.Model class). That is why the following code in getSelectionModel function of parent to grid Ext.Panel.Table class does not work:
              Ext.applyIf(selModel, {
                  allowDeselect: me.allowDeselect
      As you can see the applyIf function will never work and seems to be replaced with Ext.apply function:
              Ext.apply(selModel, {
                  allowDeselect: me.allowDeselect
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Win7x64

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Thanks for the report! I have opened a bug in our bug tracker.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts