Search code examples
checkboxdefaultextjs3

How to deselect first row checkbox in Ext JS 3.4


How can I prevent the first checkbox from being selected upon loading of my grid (EditorGridPanel) My problem is it always check the first row.

I'm using Ext JS 3.4.

code snippet:

 var chkboxSelModelUser = new com.thecompany.ux.grid.CheckboxSelectionModel();
 var userGrid = new com.thecompany.ux.grid.EditorGridPanel({
    store: that.userStore,     
    selModel: chkboxSelModelUser
    region:'center',
    margins: '0 5 5 5',
    frame: false,
    border: false,
    columns: [chkboxSelModelUser, new com.thecompany.ux.grid.RowNumberer()
    ... 
 ]...

Solution

  • If you use plain ExtJS 3.4 it shouldn't happen. Usually selecting default row is made in viewready event handler.

    See my fiddle: http://jsfiddle.net/ak3vB/1/