Display image in cell

I using the Pro version of DHTMLX grid and am having issues displaying an image in cell using javascript. When I first display my grid, I populate it with XML with no issues. The XML code is:  100



However, when I try to update this through java script, it displays the text, rather than the image.

My java script is: mygrid.cells(rowId, columnIndex).setValue(value);

where value is " 100".

I’ve tried using the !CDATA syntax with no success.



Do you have any suggestions? Thanks.

If you wish to use html elements inside cell you should store it into the CDATA:
<![CDATA[ 100]]>


Thanks for the response.  This is what I was able to do to solve my problem.  I was putting the <!CDATA tag in the session to serve it up to the page and it was not working, I'm assuming because it was translating the "<" to an escape sequence.  Instead, I am now populating the value directly in my jsp.  I also found I had to put the tag twice in order for it to be recognized.



mygrid.cells(rowId, columnIndex).setValue("<![CDATA[ " + value);


Hello,


CDATA tag should be used only in xml when you include html tags.


In case of javascript you can use the following:


mygrid.cells(rowId, columnIndex).setValue(" " + value);