Results 1 to 5 of 5

Thread: Grid with CellEditing inside FormPanel

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2011
    Posts
    16
    Vote Rating
    0
      0  

    Default Grid with CellEditing inside FormPanel

    I'm having a problem with grids that are inside the form panel (Ext 4.1.2). The thing is that if I change the value in cell and while still editing go to somekind of form field, it doesn't show cell new value. Instead it shows the old. But when again starting to edit the cell, it shows the value I inserted (thus store is updated).

    The problem is similar when you add Ext.form.Panel to code in here:
    http://docs.sencha.com/ext-js/4-1/#!...in.CellEditing

    When you now change names, it still shows Bart and Lisa, although it is changed to something else (you can see the real value when starting editing cell again).

    The code I used:

    Code:
    Ext.create('Ext.data.Store', {    storeId:'simpsonsStore',
        fields:['name', 'email', 'phone', 'number'],
        data:{'items':[
            {"name":"Lisa", "email":"lisa@simpsons.com", "phone":"555-111-1224"},
            {"name":"Bart", "email":"bart@simpsons.com", "phone":"555-222-1234"},
            {"name":"Homer", "email":"home@simpsons.com", "phone":"555-222-1244"},
            {"name":"Marge", "email":"marge@simpsons.com", "phone":"555-222-1254"}
        ]},
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
            }
        }
    });
    
    
    Ext.create('Ext.form.Panel', {
        items: [Ext.create('Ext.grid.Panel', {
            title: 'Simpsons',
            store: Ext.data.StoreManager.lookup('simpsonsStore'),
            columns: [
            {header: 'Name',  dataIndex: 'name', editor: 'textfield'},
                {header: 'Email', dataIndex: 'email', flex:1,
                    editor: {
                        xtype: 'textfield',
                        allowBlank: false
                    }
                },
                {header: 'Phone', dataIndex: 'phone'},
                {header: 'iiiii', dataIndex: 'number', field: {xtype: 'numberfield'}}
            ],
            selType: 'cellmodel',
            plugins: [
                Ext.create('Ext.grid.plugin.CellEditing', {
                    clicksToEdit: 2
                })
            ],
            height: 200,
            width: 400,
            renderTo: Ext.getBody()
        })]
    });
    Does anybody have a clue how to fix this?

    Thanks for any help!

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    So I change the value in a cell and it changes. Try to edit it again and everything is working. How do I reproduce?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Ext JS Premium Member
    Join Date
    Jan 2011
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Added a picture that says what I mean.
    cellediting_with_formpanel.png

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    Using 4.1.1, 4.1.2 and 4.1.3 with Chrome I cannot reproduce.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Ext JS Premium Member
    Join Date
    Jan 2011
    Posts
    16
    Vote Rating
    0
      0  

    Default

    I solved my problem. It appeared that the problem was between the chair and computer. The problem I had was not connected to the problem I reported in the Sencha Docs (although I can still create that problem when replacing the code in Sencha docs).

    Cheers!

Posting Permissions

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