Hi fellow programmer
I want to change the pointer to hand when hovering over jqgrid's rows Is there an API for that?
Hi fellow programmer
I want to change the pointer to hand when hovering over jqgrid's rows Is there an API for that?
It seems to me that you have not a jqgrid question, but pure CSS or javascript question. Look at http://stackoverflow.com/questions/1752372/how-to-get-cursor-to-change-before-mouse-moves-when-changing-the-cursor-style-dyn for example. It shows how can one change cursor style of a html element. See also in http://www.quirksmode.org/css/cursor.html, that 'hand' is supported not in all browsers.
Use a custom formatter on any cell in the grid. For more info on these, see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_formatter
Here's how I did it. I wanted the first column in my grid to appear like it is a clickable link (but really it triggers a custom jqgrid event, onCellSelect).
Snippet of my grid object:
colModel :[
{name:'ticket', index:'IMINDT', width:125, formatter: pointercursor},
pointercursor is a function name. The code for it is defined like this:
// Custom formatter for a cell in a jqgrid row.
function pointercursor(cellvalue, options, rowObject)
{
var new_formatted_cellvalue = '<span class="pointer">' + cellvalue + '</span>';
return new_formatted_cellvalue;
}
My CSS class of "pointer" is:
.pointer {
cursor: pointer;
text-decoration: underline;
}
That's it!