Results 1 to 2 of 2

Thread: Extjs 3.4 Editable Grid

  1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Vadodara, Gujarat, INDIA
    Posts
    1

    Default Extjs 3.4 Editable Grid

    Hello Every one, I'm New In ExtJS and try editable grid from docs. But I'm Unable to do that, I want to do without json. please can any one help me out from that?

  2. #2
    Sencha User sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,335

    Default

    Hi shivam,

    Try the following code -

    Code:
    var editorGrid = new Ext.grid.EditorGridPanel(
          {    border: true
        , editable: true
        , clicksToEdit: 1
        , initComponent: function () {
            this.store = this.store || this.createStore();
            this.colModel = this.createColumns();
        }
        , createStore: function () {
            return new Ext.data.JsonStore({
                 data : {}
                 , fields: ['coip_n', 'pp', 'com']
            });
        }
        , createColumns: function () {
            return new Ext.grid.ColumnModel({
                defaults: {
                    resizable: true
                },
                columns: [
                    {
                        header: 'Name',
                        dataIndex: 'coip_n',
                        editor: {
                    xtype:'textfield'
                      , name:'Name'
                }
                    },
                    {
                        header: 'Company',
                        dataIndex: 'com',
                editor: {
                    xtype:'textfield'
                      , name:'Company'
                }
                    },
                    {
                        header: 'Phone',
                        dataIndex: 'pp',
                    editor: {
                    xtype:'textfield'
                       , name:'Phone'
                }
                    }
                ]
            });
        }
    );
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

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
  •