Looks like we can't reproduce the issue or there's a problem in the test case provided.
-
Ext JS Premium Member
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!
-
So I change the value in a cell and it changes. Try to edit it again and everything is working. How do I reproduce?
-
Ext JS Premium Member
Added a picture that says what I mean.
cellediting_with_formpanel.png
-
Using 4.1.1, 4.1.2 and 4.1.3 with Chrome I cannot reproduce.
-
Ext JS Premium Member
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!