Fixed combo filter value

Dear Support,

Combo filters are populated by column value. How can I poplate combo filter independently?
I mean I want to show fixed values in the combo even the combo value does not appears in the column. How can I achieve that?

Thanks in advanced,

You can use “onCollectValues” event. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … lectvalues

Thank you Olga,
It works good.

Is there also a possibility to populate combo filter before the data loading (loadxmlstring)?

Thanks in advanced,

It possible to do with “onCollectValues” event as it called only after all rows are loaded. As a work around you may create custom filter and add complex html into the header.

docs.dhtmlx.com/doku.php?id=dhtm … er_extra&s[]=custom&s[]=header

One more question about combo-box,
How can I assign item pairs to a combo filter? I mean;
OnCollectValues accepts one dimensional array but like to add value and the label separately:
Forexample:
“1”,“One”
“2”,“Two”

Is that possible?

It not possible to do with “onCollectValues”. It would be much easier to add custom select box to the header and add necessary options.

It didn’t solve my problem.
After the filtering it collects combo-filter regarding to standard functionality.
How can I disable onCollectValues event for a certain combo-filter? I want to control that functionality.

Thanks

You may attach “onCollectValue” event tot the grid and control it:

grid.attachEvent(“onCollectValues”, function(index){
if (something_true())
return [“one”,“two”,“three”]; //options for select filter
else
return true; //default processing
});