我有大约8列的网格,第8列有删除按钮。当用户将鼠标悬停在删除按钮上时,工具提示应显示一些内容。现在,工具提示中的内容取决于第6列和第7列的行值。考虑第6列的行值是否为“是”并且第7列的行值为“否”,工具提示内容将为Hello,并且当第6列和第7列的行值更改时,工具提示内容也将更改。下面是我的代码,但我无法得到它。
function initializeGrid() {
$("#wellboreGrid").kendoGrid({
filterable: true,
resizeable: true,
reorderable: true,
columnMenu: true,
scrollable: false,
dataBound: function (e) {
debugger;
$("#wellboreGrid").find(".k-button").kendoTooltip({
content:e.data.item.ExistingAssn=="Yes" && e.data.item.ExistingGeologic=="NO" ? "Hello" : e.data.item.ExistingAssn=="Yes" && e.data.item.ExistingGeologic=="YES" ? "EXIT":e.data.item.ExistingAssn=="No" && e.data.item.ExistingGeologic=="YES" ? "WHAT" : Error,
width: 100,
height: 60,
position: "bottom",
});
},
columns: [
{ field: "FacilityId", title: "", hidden: true },
{ field: "FacilityName", title: "Shell Name" },
{ field: "shortName", title: "Shell Short Name" },
{ field: "ApiNumber", title: "API Number" },
{ field: "InService", title: "Service Status" },
{ field: "State", title: "State" },
{ field: "ExistingAssn", title: "Existing Association", format: "{0:c}" },
{ field: "ExistingGeologic", title: "Existing Geologic", format: "{0:c}" },
{ field: "LithoStratColoumnId", title: "", hidden: true },
{ field: "GeoIntervalId", title: "", hidden: true },
{ command: [{ click: deleteItem, text: "X" }], title: "Delete" }
]
});
$("#dvshowWellbore").attr("style", "display:inline;float: left;font-weight:bolder;font-style:italic;padding-bottom:10px;padding-left:15px;font-size:15px;");
$("#wellboreGrid").find('.k-grid-header .k-header').css('font-weight', 'bold');
};