Can we set Tooltip at cell level

Hi,



How can i enable tooltip for particular cells. I have 2 cells in a column which are editable. So the tooltip should be different.



I did not find any function to set tooltip at cell level. Please provide me a function that takes rowid,cellindex and sets the tooltip.



Regards.


>>I did not find any function to set tooltip at cell level. Please provide me a function that takes rowid,cellindex and sets the tooltip.


Unfortunately dhtmlxGrid hasn’t such method. You can set custom tooltip only via xml as “title” attribute of the tag:


Some value

I am not loading my grid from xml. i am doing it using addRow function

Please suggest a function that can add tooltip for a cell. (grid is not loaded with xml)


You can use setAtrribute method:


grid.cells(id,ind).setAtrribute(“title”,“tooltip value here”)

The solution you provided doesn not work.


Please try to use cellById(rowId,cellIndex) instead of cell(id,ind). Also check if you are calling this mehod after grid was fully loaded.


mygrid.loadXML(“grid.xml”,function(){
mygrid.cellById(rowId,cellIndex).setAttribute(“title”,“new tooltip”);

});