Results 1 to 2 of 2

Thread: How to pre-checked a CheckboxSelectionModel

  1. #1

    Default How to pre-checked a CheckboxSelectionModel

    I have a JSON store like
    Code:
    {"totalCount":54,"
    liste":[
    {"capabilities":"switch_themes","checked":1},
    {"capabilities":"edit_themes","checked":0},...
    ]}
    And a grid like that :
    Code:
                
                this.sm2 = new Ext.grid.CheckboxSelectionModel({
                    id:'checked',
                    dataIndex: 'checked'
                });
                this.grid_capabilities = new Ext.grid.GridPanel({
                    id:'button-grid',
                    store: this.store_capabilities,
                    root:"liste",
                    cm: new Ext.grid.ColumnModel([
                        this.sm2,
                        {id:'capabilities',header: "Capabilities", sortable: true, dataIndex: 'capabilities'}
                    ]),
                    sm: this.sm2,
    
                    viewConfig: {
                        forceFit:true
                    },
                    columnLines: true,
                    width:220,
                    height:250,
                    frame:false,
                    title:'Capabilities',
                    iconCls:'icon-grid',
                    style:{marginLeft:'15px'}
                });
    How can i checked the row when checked=1?
    Thanks

  2. #2
    Sencha User husniadil's Avatar
    Join Date
    Jul 2009
    Location
    Yogyakarta, Indonesia
    Posts
    45

    Default

    Try it!

    Then view source.

Posting Permissions

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