Im using kendoTooltip
to display a grid data. When it hover into data, status only display y
/n
instead Yes
/No
. Any idea how make it display Yes
/No
by using template like column/template
$("#grid").kendoTooltip({
filter: "tbody td",
position: "bottom",
width: 200,
content: function(e){
var dataItem = $("#grid").data("kendoGrid").dataItem(e.target.closest("tr"));
var content = ["Status : " + dataItem.status + "<br/>",
"Outlet Type : " + dataItem.outletType + "<br/>",
"Name : " + dataItem.name + "<br/>",
];
return content;
}
}).data("kendoTooltip");
Your dataItem is giving you exactly y and n so you can fix it like this:
$("#grid").data("kendoGrid").dataItem(e.target.closest("tr"));
console.log("dataItem",dataItem);
if(dataItem.status ==="y") var fullStatus = "yes";
if(dataItem.status ==="n") var fullStatus = "no";
var content = ["Status : " + fullStatus + "<br/>",
"Outlet Type : " + dataItem.outletType + "<br/>",
"Name : " + dataItem.name + "<br/>",
];
return content;
}
}).data("kendoTooltip");
});