How to add Tooltip to jqgrid

后端 未结 2 774
醉酒成梦
醉酒成梦 2021-01-13 04:00

I am using jqgrid to display data present in server how do i show description of data on mouse hover tool tip.

which is the best way to show tool tip on jqgrid?

2条回答
  •  一个人的身影
    2021-01-13 04:50

      var setTooltipsOnColumnHeader = function (grid, iColumn, text){
          var thd = jQuery("thead:first", grid[0].grid.hDiv)[0];  
          jQuery("tr.ui-jqgrid-labels th:eq(" + iColumn + ")", thd).attr("title", text);
         };
    
    
    and just set tooltip on header column
    
    setTooltipsOnColumnHeader ($("#empgrid"), 4, "Invoice No");
    setTooltipsOnColumnHeader ("GRID NAME", "COLUMN" , "TOOLTIP TEXT");
    

提交回复
热议问题