Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Bear on Sep 20, 2008 11:40
open dhtmlx forum
html inside a cell

I've been asked to put an icon inside a grid's cell with an onmouseover handler to open a popup with information in it. I can get the image to work by itself, but this fails:
<span onmouseover="displayHostInfo('info icon & hover', this);"><img src="/icon/Info.png" border="0"></span>
The same line is printed to the document to confirm it is successful as html outside of the grid.

Is this possible?

Thanks
Answer posted on Sep 22, 2008 02:02

You can either create your own eXcell and define event there or you can try using onMouseOver event of the grid. Event handler gets row ID and cell Index, thus you can know when mouse is over necessary cell and call a function. Like this:

yourGrid.attachEvent("onMouseOver", function(rId, cInd){

if(cInd==xxx){

displayHostInfo('info icon & hover')

}

})

As to custom eXcell creation, you can learn more details here: http://www.dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Custom_excell_creation.html#grid_cexc