PDA

View Full Version : [CLOSED] Looking for the right ComboBox Event



sisa
Mar 28, 2013, 9:28 AM
Hi all

I have here my own implementation of the Custom Search (http://examples2.ext.net/#/Form/ComboBox/Custom_Search/) Example.
Now I need to set the ComboBox Text after the Search Result has been selected...

Let me describe my need with your 'Customs Search' Example :


You type 'Ad'
The Results are shown in the ComboBox pop-out Grid
You select : 'Adder's-Tongue'
The ComboBox Text is now 'Adder's-Tongue'


I need to Show


'Adder's-Tongue - Erythronium americanum'


Any Idea how to get this ?

Peter

Daniil
Mar 28, 2013, 10:07 AM
Hi Peter,

A ModelField which you use as a ComboBox's DisplayField should contain it.

The following should work for our example.

1. Set up a new ModelField.

<ext:ModelField Name="CommonAndBotanical">
<Convert Handler="return record.get('Common') + ' ' + record.get('Botanical');" />
</ext:ModelField>

2. Set up this ModelField as the ComboBox's DisplayField.

DisplayField="CommonAndBotanical"