The problem description:
- Server-side XML file for dhtmlx grid, as well as the header filtering options;
- Image instead of raw value (e.g. green image for value “yes”, and red image for value “no”);
- Showing text “Green” (neither “yes”, nor the green image) and text “Red” (neither “no” nor the red image) in the filtering selecting box.
Solution:
- Set the column type as “coro” (must be “co-” leading);
- Set the column filtering mode as “filter_connector_select” (It must not be “filter_select”, or it fails);
- Using addOption() after the gridConfig (e.g. addOption(“mycolumn”, “yes”, “Green”); addOption(“mycolumn”, “no”, “Red”); )
- Change the “mycolumn” value in “beforeRender()” funciton, (e.g. $dataItem->set_value(“mycolumn”, “”); )