PDA

View Full Version : Highlight keyword in drop down list



SimoAmi
9 Dec 2009, 7:53 AM
I would like to highlight the keyword being typed in a combo box as illustrated in the attached mockup.

17690



I would like to know which function I need to override to achieve this behavior.
Additionally, if I want to provide support for comma separated values and have the autocomplete search for the last term being typed in, which function do I need to override.


Thanks,

9 Dec 2009, 8:35 AM
Hi Simo,

If the back-end is providing the value, you can do it that way. The back end can provide the HTML that highlights it.

SimoAmi
9 Dec 2009, 11:14 AM
Hi Simo,

If the back-end is providing the value, you can do it that way. The back end can provide the HTML that highlights it.

Hi Jay,
I wouldn't want to pass formatted data from the service layer. It won't be of much use in other areas.

I was thinking of either:
- overriding the refresh() function of the Ext.DataView associated with the combobox. That's where the template rendering happens.

- or listening to the store load event and replace records before the refresh event is called on the view layer.

Which do you recommend?

Thanks,

SimoAmi
9 Dec 2009, 11:20 AM
What would be perfect is to have a renderer callback function just like in the grid column model. The function would be called for each row rendering.

In this case, why not have the list view an instance of a grid view? is that possible?