Dhtmlxgrid Checkbox shows a black X

Hi,

I have been working with DhtmlxSuite for quite some time but have come across a sticky error I am having trouble solving. I have setup a very basic DhtmlxGrid where the first column should show a checkbox, however the checkbox shows a black ‘X’ instead of showing the Dhtmlx checkbox image. The checkbox seems to work fine, the page has no errors, it just shows a black ‘X’ whether it is checked or not.

This issue was bought out when upgrading from DhtmlxSuite version 3.6 to 4.0.

Heres what it looks like:

Heres my code:

<!DOCTYPE HTML>
<html>
<head>
    <script type="text/javascript" src="/components/dhtmlx/codebase/dhtmlx.js"></script>
    <link rel="stylesheet" type="text/css" href="/components/dhtmlx/codebase/dhtmlx.css">
</head>
</body>
<div id="gridbox" style="width: 390px; height: 350px; background-color:white;"></div>
<script>
    mygrid = new dhtmlXGridObject('gridbox');

    mygrid.setHeader("#master_checkbox,Id,Name");
    mygrid.setInitWidths("50,170,170")
    mygrid.setColAlign("center,left,left")
    mygrid.setColTypes("ch,ro,ro");

    mygrid.init();

    mygrid.parse("<rows><row><cell></cell><cell>ID</cell><cell>Name</cell></row></rows>");
</script>
</body>
</html>

Any help with this issue would be much appreciated.

Nick (Canasjoe)

Can anyone help with this issue?

Hi Canasjoe,

Try to call setImagePath method for grid;

mygrid = new dhtmlXGridObject(‘gridbox’);
myGrid.setImagePath(“your/dhtmlx/grid/source/codebase/imgs/”); //the path to images required by grid
mygrid.setHeader("#master_checkbox,Id,Name");
mygrid.setInitWidths(“50,170,170”)
mygrid.setColAlign(“center,left,left”)
mygrid.setColTypes(“ch,ro,ro”);

Hi Cemang.

I was under the impression that .setImagePath was no longer used, as of the migration notes. http://docs.dhtmlx.com/migration__index.html. However the solution worked awesomely :slight_smile:

Thank you for your help :slight_smile:

You are welcome :slight_smile: