セルがホバーされたときにツール ヒントを表示するためのより効率的な方法はありますか? 構造属性を使用してデータグリッドをフォーマットします。html タイトル属性を使用するのではなく、フォーマッタを使用して dijit ツールチップを表示する方法はありますか。
これは、ツールヒントが表示されている列です。
var subscriberGridLayout = [
{
name: " ",
field: "ExpirationDate",
formatter: function(value){
if(value){
expDate = formatDateIE(value);
return toolTip();
}
else
return " ";
},
styles: "text-align: center;",
width: "30px"
},
イメージ タグを介してツールチップ アイコンを表示する関数を次に示しますが、dijit ツールチップの代わりに、単に html のタイトルを使用してポップアップを表示します。
function toolTip(){
src = "'/Subscriber/resources/images/icons/icon_error.gif'/>";
if(dojo.date.difference(today, expDate) <= 0 ){
message = "Credential expired.";
return "<img title='"+ message + "' src=" + src + "";
} else if(dojo.date.difference(today, expDate) <= 60) {
message = "This Subscriber will expire in " + dojo.date.difference(today, expDate) + " days."
+ " To prevent an interruption in the Subscriber’s access, please sumbit a request to " +
"renew the Subscriber within 30 days of the expiration date.";
return "<img title='"+ message + "' src=" + src + "";
} else {
return " ";
}
}