Вопрос

i have a store which has 3 fields:Name,age and phoneNo. As of now in my combobox i just display the name ie dispalyField:'Name'.Is there a way,i can display all the 3 fields in the combobox.

I tried using:

listConfig : {
  itemTpl : '{Name} {age} {phoneNo}'
}

but this shows all the 3 values together like this:

John Smith 93831222
John Ford  44222456

i want it to be displayed like this in the combobox,one below the other:

John 
Smith 
93831222
Ford  
44222456

so that i can select any one of these.Any help is highly appreciated...thanks

Это было полезно?

Решение

try this:

listConfig : {
   getInnerTpl: function(){ return '{Name} - {age}<tpl if="age === null">undefined</tpl> - {phoneno}{email}'; }
}

you can add any html code in the template

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top