Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by roxana on Apr 23, 2008 02:26
open dhtmlx forum
How can I insert a picture in a dhtmlxgrid cell?

How can I insert a picture in a dhtmlxgrid cell?

I have to show in a dhtmlxgrid a list with projects and on the first column I have to show a image related to each project. I don't know how to write the xml file to upload images for the first column.
T.I.A.
Answer posted by Support on Apr 23, 2008 02:37
There are two ways

a) use img column type

    grid.setColTypes("img,ro");
    ....
    <cell>just/some/url/file.gif</cell><cell> Second column </cell>

b) use inline HTML

    grid.setColTypes("ro,ro");
    ....
    <cell><![CDATA[ <img src='just/some/url/file.gif'> ]]></cell><cell> Second column </cell>