PDA

View Full Version : Why I see only first option when selected any in ComboBox



Romantik
6 Jun 2008, 2:02 AM
Hi Team!



var store_field = new Ext.data.JsonStore({
root: 'resitems',
url: 'index.php?store=field',
id: 'client_id',
fields: [{name: 'client_name'}]
});


then


var cm = new Ext.grid.ColumnModel([{
dataIndex: 'client_name',
editor: new Ext.form.ComboBox({
displayField: 'client_name',
valueField: 'client_id',
store: store_field,
editable: false,
triggerAction: 'all'
}),
header: 'Name'
}]);


I see in GRID this comboBox and see options, but when select one of them I always see first option

example:
Berry
John
Merry
Pedro

if I select any see only first one 'Berry'


thanks for any help
Best regards.

Romantik
6 Jun 2008, 3:36 AM
I've solved this problem


fields: [{name: 'client_name'},{name: 'client_id'}]