当我将鼠标悬停在一个特定的单元值,所述悬停值是一样的单元值。我可以改变从单元格的值不同悬停文字?
谢谢
通常,工具提示是title
元件的<td>
属性。您可以使用setCell方法来更改提示(见this)。在更复杂的情况下,你可以使用jQuery.attr(见here),或者你一个提示插件(见here)。
您可以使用cellattr属性在colModel为列设置自定义提示。例如
cellattr: function () { return ' title="my custom fixed tooltip for the column"'; }
这可以通过两个步骤实现
title:false
禁用默认工具提示var changeTitle = function(cellVal, options, rowObject){<br/>
return "<div title='This is the cell value " + cellVal + "'>" + cellVal + "</div>";<br/>
}
colModel:[
{...},<br/>
{name:'priorityFlag', index:'priorityFlag', width:40, align:"center", formatter: changeTitle },<br/>
{...}]
你去那里!...
$("#PersonelGrid_DefViewMainPage").attr("title", "This is my Title.");
是工作..