The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Gucky (30) [Avatar] Offline
#1
Hi all,

I tried to use the examples in the book to create a propertyGrid that contains a comboBox which is dynamically filled. I am getting as far as seeing the data returned and the correct number of lines added into the drop down but no text is displayed. Below the details, what am I missing ?

var grid = new Ext.grid.PropertyGrid({
id : 'propGrid',
title : false,
propertyNames : {
appId : 'Application Id',
env : 'Environment'
},
source: {},
customEditors: {
'env': new Ext.grid.GridEditor(new Ext.form.ComboBox({
store : new Ext.data.JsonStore ({
id : 'combo',
root : 'data',
fields : [ { name : 'env', mapping : 'env' }],
proxy : new Ext.data.ScriptTagProxy({
url : 'getComboData.jsp'
})
}),
triggerAction: 'all',
editable: false,
allowBlank: false
}), {}),
'appId' : new Ext.grid.GridEditor( new Ext.form.TextField ({
disabled : true
}), {})
}
});

var propertyStore = new Ext.data.JsonStore({
autoLoad: true,
url: getPropData.jsp',
root: 'data',
fields: [
'appId',
'env'
],
listeners: {
load: {
fn: function(store, records, options){
var propGrid = Ext.getCmp('propGrid');
if (propGrid) {
propGrid.setSource(store.getAt(0).data);
}
}
}
}
});