dhtmlxgrid combo filter issue

Hi,

There’s an issue with the combo filter when i i’m populating combo text from an external xml file, the combo filter doesn’t show up the option text as filter options instead it shows the option values as filter options. Any solution to counter this isuue.





Thanks in advance,

Regards,

Dilip


Hello,


Could you please provide some details ?


What filter do you mean ?


#filter_combo can’t be loaded from the xml. In this case combo is populated automatically.

I have the same problem… but I don’t load any data into my combo box from XML. I use server side ASP.NET for my work, but even using flat HTML, I was able to reproduce the problem.

So I have a flat HTML SELECT tag like this one:

Select Province Alberta British Columbia Manitoba New Brunswick Newfoundland and Labrador Nova Scotia Northwest Territories Nunavut Ontario Prince Edward Island Quebec Saskatchewan Yukon

… then in my javascript, I make a filter and apply it against my grid class:

var mygrid = new dhtmlXGridObject(‘grdOrgList_container’);
mygrid.makeFilter(“cbProv”, [myIndex]);

and when the page loads, the output of my combobox/dropdown looks like this:

AB
BC
MB
… and so on…

if I simply change the ID attribute of the select tag to something else (without changing the reference to makeFilter() in the javacript. The HTML renders the SELECT tag with the proper labels (not the values).

Any hints on how I could get around this issue?


If you use makeFilter method, select will automaitcally filled by values from grid. If you want to keep the select as is, you need to use another approach:

var mygrid = new dhtmlXGridObject(‘grdOrgList_container’);

document.getElementById(‘cbProv’).onchange = function(){
mygrid.filterBy(myIndex,this.value);
}

that did the trick!

Thanks for replying so quickly!!!

Dilip,

Could you please tell, how to load xml data’s to combo in DHMTLxGrid which is from XML file.