PDA

View Full Version : Highlighting First Item in BoundList



neurodon
3 May 2012, 8:46 AM
Hey,

I've got a search control that is a ComboBox with an attached boundlist. It uses a remote JSON store. I'm trying to get the first entry to always be highlighted (not selected... that populates the combobox and prevents inline search from working properly). Here is what I have so far for the BoundList config:



listConfig: {
loadMask: false,
cls:'header_searchresults',
shadow:false,
autoSelect:true,
listeners: {
refresh: function(me) {
if(me.rendered && me.store.totalCount > 0) me.highlightItem(me.getNode(0));
}
}
},


The me.getNode(0) call works just fine, however me.highlightItem does not seem to do anything.

Any suggestions?

Brandon

neurodon
3 May 2012, 9:45 AM
I figured it out... simple oversight on my part.

You must override the '.x-boundlist-item-over' CSS class, or override the overItemCls property.