jqGrid的更改列标题属性

问题描述 投票:3回答:4

当我将鼠标悬停在一个特定的单元值,所述悬停值是一样的单元值。我可以改变从单元格的值不同悬停文字?

谢谢

jquery jqgrid
4个回答
1
投票

通常,工具提示是title元件的<td>属性。您可以使用setCell方法来更改提示(见this)。在更复杂的情况下,你可以使用jQuery.attr(见here),或者你一个提示插件(见here)。


5
投票

您可以使用cellattr属性在colModel为列设置自定义提示。例如

cellattr: function () { return ' title="my custom fixed tooltip for the column"'; }

1
投票

这可以通过两个步骤实现

  1. 你可以简单地通过设置title:false禁用默认工具提示
  2. 写一个全球性的功能和附加为colModel格式化 var changeTitle = function(cellVal, options, rowObject){<br/> return "&lt;div title='This is the cell value " + cellVal + "'>" + cellVal + "&lt;/div>";<br/> } colModel:[ {...},<br/> {name:'priorityFlag', index:'priorityFlag', width:40, align:"center", formatter: changeTitle },<br/> {...}]

你去那里!...


0
投票
  • 您可以右键单击标题
  • 学习一列ID名前:PersonelGrid_DefViewMainPage
  • 设置您电网负荷这段代码以后。 $("#PersonelGrid_DefViewMainPage").attr("title", "This is my Title.");

是工作..

© www.soinside.com 2019 - 2024. All rights reserved.