View Full Version : Edit PropertyGrid values

19 Jan 2012, 2:48 PM
Hey all,

I'm trying to save edited PropertyGrid values in my store, but it doesn't work. What's wrong?

var buildingGrid = Ext.getCmp('buildingGrid');

buildingGrid.on('propertychange', function(source, recordId, value, oldValue) {
var buildingStore = this.getStore('OE.store.Building');
buildingStore.getAt(0).set(recordId, value);

Many thanks in advance!

20 Jan 2012, 8:44 AM
What do you mean it doesn't work? What doesn't work?

20 Jan 2012, 12:11 PM
Editing a value of a field being the valueField of my combobox throws an undefined error. Seems as if I have to update my combobox after editing data. Long story short, I don't know how to do so!

xtype: 'combo',
id: 'selFloor',
emptyText: 'Select Floor ...',
store: 'OE.store.Floor',
queryMode: 'local',
displayField: 'floorName',
valueField: 'floorId',
editable: false

24 Jan 2012, 1:52 PM
Okay fixed it! I tried to access a non-existing record. What I still don't know is how to update the content of my combobox! Any help would be greatly appreciated! :)

... btw, another problem raised: getValue() returns display- instead of valueField! Solutions I found on the web refer to Ext JS 3.* (using hiddenName config). I'm using Ext JS 4! Any idea?