combo options should be visible on arrow click after filteri

I am using dhtml combo and using the following code:



var combo=new dhtmlXCombo(“combo_zone2”,“alfa2”,200);

combo.enableFilteringMode(true);

combo.addOption([[‘1’,‘Imran’],[‘2’,‘Abbasi’],[‘33’,‘Ajmal’],[‘44’,‘Rashid’],[‘5’,‘Khan’]]);



When I click on the combo arrow after filtering then all other options are disappeared from the combo list.

I want, all the options to be there after the filtering.


can be done, by adding next code to the combo’s init

combo.attachEvent(“onOpen”,function(){
var text = combo.getComboText();
combo.setComboText();
combo.filterSelf();
combo.setComboText(text);
return true;
});


I have used your code. But after using your code, when I click on the combo then it goes to the infinite loop. What is this problem?

Please, try to set timeout like as follows:

combo.attachEvent(“onOpen”,function(){
    window.setTimeout(function(){
        var text = combo.getComboText();
        combo.setComboText("");
        combo.filterSelf();
        combo.setComboText(text);
    },1);
}

When I used this then my combo gets disappear and two java script errors arises:


t is undefined
for (var q=0; q<t.getElementsByTagName(“control”).length; q++) {
editor2.js (line 21)
missing ) after argument list
function onKeyPressedFunc(key)\n


I got a mail from dhtmlx but my answer of my question was not there.

Working sample attached
1226587104.zip (17.6 KB)

Hi,

Thanks for the sample. Its working but not 100% as we desired. Please find the attached image. Basically its like when we type it would filter and autocomplete but all items in the list should be shown. Is that possible?

Best regards

Unfortunately there is no way to use combo in such mode.


Everything works fine,but when selecting the combo using tab complete text gets highlighted and on press any alphabet in keyborad,only



the second time of pressing the same alphabet autocomplete starts working. Pressing only once clears the text and the typed alphabet is not there.



HOw to overcome this.



Plz help me. its very urgent.

There is no way to achieve fully correct behavior through existing events, but it possible with usage of native DOM events.
Please check updated sample.

3849234.ZIP (18.2 KB)


thanku so much…its working for me now.



Thanks a lot.