Filtering data inside dHtmlxCombo filter

Hi guys,

I have two combo boxes in my project. When I select a value from first combo box, I want second combo box to filter that value. Is there any way to do that?

For example,

First Combo Box Second Combo Box
-Nebraska -Omaha, NE
-New York -Lincoln, NE
-California -New York, NY

Data

States Cities
-Nebraska -Omaha, NE
-Nebraska -Omaha, NE
-New York -New York, NY
-California -San Francisco

When I select Nebraska, I want only Omaha and Lincoln appear in my second combo box.

Thanks

Check
docs.dhtmlx.com/doku.php?id=dhtm … _extension

Is there any other way making it without using server side script?

I am setting my filter in Grid,

mygrid.attachHeader("#combo_filter,#combo_filter,#combo_filter");

I tried using event listener and refreshFfilters method but it is not working

[code]mygrid.attachEvent(“onGridReconstructed”, function(elements){
// alert( elements.getValue());
mygrid.refreshFilters();
});

[/code]

PLease, try to use the following code:

mygrid.attachEvent("onFilterEnd", function(elements){ mygrid.refreshFilters(); });
Also, you need to modify dhtmlxgrid_filter.js file.
find

var col=this._f_rowsBuffer||this.rowsBuffer;

and replace it with

var col=this.rowsBuffer;

Thanks a lot sematik. Awesome.

And thanks to gokhanarik for bringing this up. Am looking for this for a long time.

I tried this fix and it works for some cases, but it doesn’t work well with numeric filters.

If you select an item from the select filter and then type something into the numeric filter the select filter will be lost.

Same thing happens with text filters. If you type in a string that results in no records being found the select filter will be lost.

Do you have a fix for this?

Unfortunately the issue cannot be reproduced locally.
If it’s still occurs for you, pleas,e provide with a complete demo, or a demo link, where the issue can be reconstructed.