Code:
var fieldCombo = new Ext.form.ComboBox({
id: 'fieldNameCombo,
name: 'columnName',
typeAhead: false,
displayField:'GRPBYNAME',
valueField:'GRPBYID',
queryMode:'local',
width:140,
allowBlank: false,
emptyText: 'Select search field',
renderTo: 'fieldNameBox',
store:{
xtype:'Store',
fields:[
{
type:'string',
name:'GRPBYID'
},
{
type:'string',
name:'GRPBYNAME'
}
],
data:[
{
'GRPBYID':'TEXT',
'GRPBYNAME':'Name'
},
{
'GRPBYID':'TEXT',
'GRPBYNAME':'Address'
},
{
'GRPBYID':'DATE',
'GRPBYNAME':'Date'
},
{
'GRPBYID':'NUMBER',
'GRPBYNAME':'Number'
},
{
'GRPBYID':'DATE',
'GRPBYNAME':'Time'
}
]
}
});
I have the above code,In that code i assigned GRPBYID as the value field. The data which comes from server has same GRPBYID value for different display names.The problem is that when i try to select different display name with same value combo box is not selecting the new display field.
Please suggest if there is any mistake in the code.