Search code examples
jqueryjqgridtooltip

Does jqgrid support tooltips on header cells (and grouped header cells)


I am using jqgrid and I want to have a tooltip that is a different value for each column heading (i want to put in the description in to a tooltip) for each column name. In my case I am using the treegrid but my question applies to both the treegrid and the regular jqgrid.

Is this possible? Again, I am looknig to do this for every column header (both regular and grouped header cols)


Solution

  • I think this answer gives the answer on your question too.

    If you prefer to use more direct way as described in the answer you can just use the fact that all <th> elements of the column headers has ids which are constructed from the id of the grid, like "list" and the value of the name property of the column, like "tax", and the underscore ("_") between. So in the described above example the id of the column will be "list_tax". So you can set the tooltip just by setting of the title attribute on the corresponding <th> element:

    $("#list_tax").attr("title", "my tooltip");