dimanche 18 mai 2014

How i can change value in combofield from idx to name

Form edit item

i get index of item from grid , it send to new window form


i want to change from index to name



Code:



xtype : 'combo',
fieldLabel: 'owner',
name: 'prod_supplier',
id : 'prod_supplier',
allowBlank: false,
store: m_Supplier,
typeAhead:true,
displayField:'name',
valueField:'idx',
listeners : {
'change' : function(e) {
e.store.setProxy({type:'ajax',url:'desktop/stock_list/supplier',reader:{root:'data'}});
e.store.load();
}
}

prod_supplier is index ( number)

it want to get it and check in database then return name for me


how i can do it ?


++++++++++++++++


it will show number in field if i click to combo list it will show name from listeners





Aucun commentaire:

Enregistrer un commentaire