View Full Version : Loading subset of json into editable combobox in the Grid

21 Jan 2013, 8:52 AM

I am building a grid based on JSON data which is based on the following

var subAccountStore = new Ext.data.JsonStore({
autoLoad: true,
proxy: {
url : '/opUI/json/subaccount.action?name="ABC"'
fields: ['accountName', 'accountNumber','accountNumbers', 'quantity']


and the sample JSON is


Now I am trying to build grid with editable combo box as one of column

So my code snippet is
columns: [
text : 'Account Name',
width : 60,
flex : 3,
sortable : true,
dataIndex: 'accountName'
text : 'Account Number',
flex : 2,
sortable : false,
dataIndex: ???,
editor: new Ext.form.field.ComboBox({
typeAhead: true,
triggerAction: 'all',
selectOnTab: true,
store: ???,
lazyRender: true,
listClass: 'x-combo-list-small'

text : 'Quantity',
flex : 2,
sortable : true,
dataIndex: 'quantity',
align : 'right',
editor: {
xtype: 'numberfield',
allowBlank: false,
minValue: 0,
maxValue: 100000

I am not sure how to make each row shows combobox of it's accountNumbers.

I would really appreciate if some one can put me in the right direction.


23 Jan 2013, 10:40 AM
By default the combobox you would need to set a store with it's own data, to get it from the response from the grid, you would need to extend the editing plugin and set the data from the record being edited onto the combobox's store.

29 Jan 2013, 8:46 AM
Thanks the response.

Can you give me an example for extending the editing plugin?