View Full Version : Custom selection in ComboBox

19 Mar 2009, 5:48 AM
Hi all,
I have this combobox

var pazienteField = new Ext.form.ComboBox({
tpl: '<tpl for="."><div ext:qtip="{surname} {name}" class="x-combo-list-item">{surname} {name}</div></tpl>',
fieldLabel: User Data,
store: pazienteStore,
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
loadingText:'Caricamento in corso...',
anchor : '95%'

which is using a store with a store with surname, name and id fields. using the tpl attribute I'm able to see combo composite values (name and surname) when the combo is open. When I select an item I just see the surname field that I put as displayField. What I want to see when I select an item is the composite label and not just the surname field.
What I have to do for that?

Thankx in advance