HI, I have GNU version
In the next code I define many selectboxes as the filters for a grid columns:
…
dhxGrid.makeFilter(“unidad”,0);
…
Dirección
Secretaria
…
It works.
I have a button and a function to reset the filters:
…
…
so I tried this:
…
function unsetFilterAll(){
dhxGrid.getFilterElement(0).value="";
…
}
…
And this:
function unsetFilterAll(){
document.getElementById(“unidad”).selectedIndex="-1";
…
}
both clear the selectboxes, but the grid doesn’t back to no-filtered state, I dont want to reload the dataset because it’s big.
help please.
Thanks.
both clear the selectboxes, but the grid doesn’t back to no-filtered state
With provided code you just clear selected option in select box. If you want to unfilter grid you should use following grid api:
grid.filterBy(column_index,"");
Please find tutorial here docs.dhtmlx.com/doku.php?id=dhtmlxgrid:filtering
docs.dhtmlx.com/doku.php?id=dhtm … t_filterby