I have a gridPanel with the following column:
header: 'Current plan',
tooltip: 'Current plan',
dataIndex: 'plan_id',
editor: new Ext.form.ComboBox({
allowBlank: true,
typeAhead: true,
triggerAction: 'all',
lazyRender: true,
mode: 'local',
valueNotFoundText: 'no data',
valueField: 'id',
displayField: 'text',
store: new Ext.data.ArrayStore({
fields: ['id', 'text'],
data: [
['1', 'Plan one'],
['2', 'Plan two'],
['3', 'Plan three'],
['4', 'Plan four']
]
})
}),
So when I edit this field in column – I get “Plan one”, “Plan two”, “Plan three”, “Plan four” as values to choose, when I choose them – dataIndex is set to 1-2-3-4 and displayed in column field like that.
What I want is dataIndex field to stay 1-2-3-4 values (since it’s ones I use in backend), but I want them to show up in my column field like “Plan one”, “Plan two” and so on.
How can I do it? Thanks!
Solved with
in column model.