1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    107
    Vote Rating
    0
    boston-george is on a distinguished road

      0  

    Default Ext.grid.CheckboxSelectionModel

    Hy guys,

    when i click into CheckBox of grid i receive thsi error in firebug:

    this.grid is undefined

    var r = Ext.isNumber(index) ? this.grid.store.getAt(index) : index;

    this is my code:
    Code:
    function
    crtGridOrdCompletare(){ var sm = new Ext.grid.CheckboxSelectionModel({ checkOnly: true
    });   Ext.getCmp(
    'pnlAllCenter').add({ xtype: 'editorgrid', flex: 1, id: 'grlOrdCompletare', columns: [ sm, { xtype: 'gridcolumn', dataIndex: 'F15STAORD', header: 'Stato<br>Ordine', sortable: true, width: 100, editable: false, align: 'center', id: 'clmF15STAORD'
    }, { xtype:
    'gridcolumn', header: 'Tipologia<br>Ordine', sortable: true, width: 100, align: 'center', dataIndex: 'F15TIPORD', editable: false, id: 'clmF15TIPORD'
    }
    ],
    //chiusura colonne
    store :
    new Ext.data.JsonStore({ storeId: 'strOrdCompletare', root: 'rootOrdCompletare', autoLoad: true, url: '/Project/public/ordini/strordcompletare', totalProperty: 'totalOrdCompletare', fields: [ { name: 'F15STAORD'
    }, { name:
    'F15TIPORD'
    }
    ] }),
    }); Ext.getCmp(
    'pnlAllCenter').doLayout(); }

    how can i solve it?
    thanks

  2. #2
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    582
    Vote Rating
    268
    Tim Toady has much to be proud of Tim Toady has much to be proud of Tim Toady has much to be proud of Tim Toady has much to be proud of Tim Toady has much to be proud of Tim Toady has much to be proud of Tim Toady has much to be proud of Tim Toady has much to be proud of

      0  

    Default

    Specify the sm property on your grid. sm: sm

  3. #3
    Sencha User
    Join Date
    Oct 2010
    Posts
    107
    Vote Rating
    0
    boston-george is on a distinguished road

      0  

    Default

    i've add

    selModel: sm,

    and now it's work done!
    thanks a lot!!

Thread Participants: 1