1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    1
    Vote Rating
    0
    Jvn is on a distinguished road

      0  

    Default Unanswered: what to include for Row editing

    Unanswered: what to include for Row editing


    Hi ,

    I am very new to extjs.

    What styles and script files need to include for row editing .

    suppose i copied the code from sencha and pasted with in the <script> tag . but i need to call that script . where to call and how to call can any one help to me.

  2. #2
    Sencha User
    Join Date
    May 2012
    Posts
    21
    Vote Rating
    1
    tsuryap is on a distinguished road

      0  

    Default Use separate js file

    Use separate js file


    Hi,

    paste your code in separate js file and inculde it in your html or jsp using script tag ........

    and your code should be enclosed in Ext.onReady(function(){
    your code................
    });
    Now run your html file....sorry for bad english...

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,011
    Answers
    668
    Vote Rating
    460
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    It is as simple as this:

    Code:
    Ext.create('Ext.data.Store', {
        storeId : 'simpsonsStore',
        fields  : ['name', 'email', 'change'],
        data    : {'items' : [
            { 'name' : 'Lisa',  'email' : 'lisa@simpsons.com',  'change' : 100  },
            { 'name' : 'Bart',  'email' : 'bart@simpsons.com',  'change' : -20  },
            { 'name' : 'Homer', 'email' : 'home@simpsons.com',  'change' : 23   },
            { 'name' : 'Marge', 'email' : 'marge@simpsons.com', 'change' : -11  }
        ]},
        proxy   : {
            type   : 'memory',
            reader : {
                type : 'json',
                root : 'items'
            }
        }
    });
    
    var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
        clicksToMoveEditor: 1,
        autoCancel: false
    });
    
    Ext.create('Ext.grid.Panel', {
        title      : 'Simpsons',
        store      : Ext.data.StoreManager.lookup('simpsonsStore'),
        columns    : [
            { header : 'Name', dataIndex : 'name', editor: { xtype: 'textfield' } },
            { header : 'Email', dataIndex : 'email', flex : 1, editor: { xtype: 'textfield' } },
            { header : 'Change', dataIndex : 'change', editor: { xtype: 'numberfield' } }
        ],
        height     : 200,
        width      : 400,
        renderTo   : Ext.getBody(),
        
        plugins: [ rowEditing ]
    });‚Äč
    Scott.

Thread Participants: 2