Results 1 to 3 of 3

Thread: How to add a checkbox column in a gridpanel in ExtJS4.0.2

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    15
    Vote Rating
    0
      0  

    Default Answered: How to add a checkbox column in a gridpanel in ExtJS4.0.2

    Now I want to add a checkbox column in a gridpanel like this.未命名.jpg
    Andbody help me?

  2. There is an example here on this page:
    http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/grid-plugins.html

    *
    extract
    Code:
    var sm = Ext.create('Ext.selection.CheckboxModel');    var grid2 = Ext.create('Ext.grid.Panel', {        store: getLocalStore(),        selModel: sm,        columns: [            {text: "Company", width: 200, dataIndex: 'company'},            {text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},            {text: "Change", dataIndex: 'change'},            {text: "% Change", dataIndex: 'pctChange'},            {text: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}        ],        columnLines: true,        width: 600,        height: 300,        frame: true,        title: 'Framed with Checkbox Selection and Horizontal Scrolling',        iconCls: 'icon-grid',        renderTo: Ext.getBody()    });

  3. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Answers
    501
    Vote Rating
    249
      0  

    Default

    There is an example here on this page:
    http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/grid-plugins.html

    *
    extract
    Code:
    var sm = Ext.create('Ext.selection.CheckboxModel');    var grid2 = Ext.create('Ext.grid.Panel', {        store: getLocalStore(),        selModel: sm,        columns: [            {text: "Company", width: 200, dataIndex: 'company'},            {text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},            {text: "Change", dataIndex: 'change'},            {text: "% Change", dataIndex: 'pctChange'},            {text: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}        ],        columnLines: true,        width: 600,        height: 300,        frame: true,        title: 'Framed with Checkbox Selection and Horizontal Scrolling',        iconCls: 'icon-grid',        renderTo: Ext.getBody()    });

  4. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    15
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by slemmon View Post
    There is an example here on this page:
    http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/grid-plugins.html

    *
    extract
    Code:
    var sm = Ext.create('Ext.selection.CheckboxModel');    var grid2 = Ext.create('Ext.grid.Panel', {        store: getLocalStore(),        selModel: sm,        columns: [            {text: "Company", width: 200, dataIndex: 'company'},            {text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},            {text: "Change", dataIndex: 'change'},            {text: "% Change", dataIndex: 'pctChange'},            {text: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}        ],        columnLines: true,        width: 600,        height: 300,        frame: true,        title: 'Framed with Checkbox Selection and Horizontal Scrolling',        iconCls: 'icon-grid',        renderTo: Ext.getBody()    });
    Thanks.It's helpful

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
  •