Adding combox box with images to dhtmlxgrid via connector


I have a grid being fed by a connector (PHP), with standard coro options set on a column using OptionsConnector() and set_options().

$grid = new GridConnector($db_connection);

$xxFilter = new OptionsConnector($bd);
    "SELECT index AS value, description AS label FROM options_table .....",
    "value(value), label(label)"
$grid->set_options("fieldname", $xxFilter);

$sql = "SELECT * FROM datatable";
$grid->render_sql($sql, "index", "name,adress.....");[/code]

All is great, but i’d like to add a combo column with images.
I’ve looked at the source code for set_options() and it seems to be a “value,title” pair only, so no scope to set images from here (I think).

Setting the options to be images:
For coro the images are displayed correctly, but options are raw html.
If I set the column to combo, then the images are displayed correctly (as before) AND the options show correctly BUT the selected value in the cell showx the raw html ( <img src="… ).

Is there a way of setting this through the connector???

IF not then can I: set it on the client end using a custom column type (i’ve done with a window for text editing, but not with a combo); reset the column type to be the defined combo (no API for resetting a single column type) or over-ride the edit action of that column (but how do i popup the combo)?

Here is the client end code:

            myCombo = new dhtmlXCombo({
                options: [
                    {value: "0", img_src: "stars0.png"},
                    {value: "1", img_src: "stars1.png"},
                    {value: "2", img_src: "stars2.png"},
                    {value: "3", img_src: "stars3.png"},
                    {value: "4", img_src: "stars4.png"},
                    {value: "5", img_src: "stars5.png"}

            myLayoutLocation = new dhtmlXLayoutObject({
                parent: "location_data",
                pattern: "1C",
                skin: "dhx_skyblue",
                cells: [
                        id: "a",
                        text: "",
                        header: false,
                        height: 400,
                        collapse: false,

            mySubGrid = new dhtmlXGridObject('data_sub');
            mySubGrid.loadXML('/grid_connector.php?area=subgrid&_='+Date.parse(new Date()), function(){
                myGrid = myLayout.cells("a").attachGrid();
                myGrid.loadXML('/grid_connector.php?area=grid&_='+Date.parse(new Date());

                dp = new dataProcessor("/grid_connector.php?area=grid");

I’ve seen a few examples of a grid with a image combo box, but this was set through XML and not a connector.

I could possibly use the Menu method instead setSubContext() , BUT there are no notes on this in the API!! … olumntypes … _menu.html


setStyle modifies the default style of the grid and its elements
<— missing here! … ntext.html 404 not found
setSubGrid attaches a grid-like editor to a grid’s column
setSubTree attaches a tree-like editor to a grid’s column
setTabOrder sets the tab order of columns
setUserData sets user data for a row
setXMLAutoLoading enables dynamic loading from XML
showRow scrolls a row to the visible area