PDA

View Full Version : Ext.form.ComboBox change two values at same time



mbaszczewski
5 Nov 2009, 2:13 PM
Hi.
In my project I need update additional value on change first. Look my code first:



{
header: "Projektant",
width: 100,
sortable: true,
dataIndex: 'shop_designer_id',
editor: new Ext.form.ComboBox(
{
typeAhead: true,
triggerAction: 'all',
store: designerData,
displayField: 'name',
valueField: 'id',
mode: 'local',
editable:false,
forceSelection: true,
allowBlank: false,
lazyRender:true,
listClass: 'x-combo-list-small',
listeners:
{
change: function( field, newValue, oldValue )
{
grid.getSelectionModel().getSelected().set('shop_packet_id',0);
}
}
})
},
{
header: "Kolekcja",
width: 100,
sortable: true,
dataIndex: 'shop_packet_id',
editor: new Ext.form.ComboBox(
{
typeAhead: true,
triggerAction: 'all',
store: packetData,
displayField: 'name',
valueField: 'id',
mode: 'local',
editable:false,
forceSelection: true,
allowBlank: false,
lazyRender:true,
listClass: 'x-combo-list-small'
})
},Why this don't work correctly?
Sometimes I get 0 value in shop_packet_id but it's only sometimes.
Please help me! :)