Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sirisha on Mar 29, 2009 22:10
open dhtmlx forum
First option highlighted

Hello,
Im using autocomplete combo with filtering enabled.
How can i make my first item highlighted when complete drop down is shown on click of arrow.
When we click on dropdown by default i want to display all item in list with first item highlighted.
How can i achive this.
Plz help me.
Answer posted by Alex (support) on Mar 30, 2009 05:33

Hello, 

You can try to use the following method:

combo.attachEvent("onOpen",function(){
 window.setTimeout(function(){
  var index = combo.getSelectedIndex();
  var text = combo.getComboText();
  combo.setComboText("");
  combo.filterSelf();
  combo.setComboText(text);
 },1);
 return true;
});