dhtmlx Combo is not populating things from XML string

Hi,

I am trying to populate fields from an XML String into the combo box using filtering and auto complete, but it is displaying only the first field upon onKeyPressed event. All the events are not getting populated. I have a commercial license for using the library and it is to be renewed in some time from now. In such prospects could you help me out on priority.

I am passing the xml string as this.str in the below listed function.

this.dhxCombo.loadXMLString(this.str);

Files included :
dhtmlxcombo.css
dhtmlxcombo.js
dhtmlxcommon.js
dhtmlxcombo_whp.js

Hi,

I’ve attached the sample. Please provide the example of problematic xml if the problen is not solved
sample.zip (664 Bytes)

The XML string that is being passed is of the form :

it is a dual mode search : ip based and name based.

Could you explain how to retrieve the content and populate in the combo box using autocomplete.

Hello,

Combo allows to filter options by its text (content of option text). Other tags won’t be parsed.

You may either use server-side filtering in combo with disabled caching:

var combo = form.getCombo(itemId);
combo.enableFilteringMode(true,url,false);

In this case the request with mask will be send each time you type a char.

The another approach is to create a custom item:

docs.dhtmlx.com/doku.php?id=dhtm … s.someitem

Hi,

Also, I passed the following string in dhtmlxCombo.loadXmlString() for just testing purpose:

10.51.122.4010.51.122.47

What is happening is that apart from the first option, all the options have “display:none” property set for them, making them invisible.
Also because of this, height calculated for “dhx_combo_list” div is always 20px.

Hi,

when filtering is enabled, combo list displays only options that correspond mask. So, if an option is selected, only this option will shown in list.

Please check filtering samples

enableFilteringMode is set to be true.

Also with the same code earlier fields were getting populated successfully. The problem arose only after we upgraded to the dhtmlx pro v3.0 library. Now all the fields are getting a “display: none” property set for them except for the first option. So i believe their is no problem with the code as it was working good with the previous version of dhtmlx.

displaying only those options that correspond typed mask is correct behaviour for combo with filtering. And it must be actual for all combo versions.

You may try to use the following approach to display all options when list is opened:

dhtmlxEvent(combo.DOMelem,“mouseup”,function(){
if(combo.DOMlist.style.display == “none”){
window.setTimeout(function(){
var text = combo.getComboText();
combo.setComboText("");
combo.filterSelf();
combo.setComboText(text);
},1);
}
})

Thanks for your support . The problem was resolved.