I am trying to create a tooltip for my grid as follows:
$("#grid").kendoTooltip({
autoHide: true,
showOn: "mouseenter",
width:125,
height:125,
position: "right",
filter: ".k-grid-content a.hasTooltip",
content: kendo.template($("#storeTerritory").html())
});
Template Definition:
<script type="text/x-kendo-template" id="storeTerritory">
<div class="tooltipcontent">
#for(var i = 0; i < Territories.length; i++){#
#if (Territories != 'null' && Territories != '') {#
<p>#=Territories[i].TerritoryDescription#</p>
#} else{#
<p>Information not available</p>
#}#
#}#
</div>
</script>
I installed the sample here:
http://jsbin.com/iJunOsa/21/edit
I get an error ReferenceError: Territories is not definedin the console when I click on "Wilton"
Let's say I have to replace the contents of the template storeTerritorywith plain HTML code, then a tooltip will appear:
<p>Wilton</p>
What could be the problem?
source
share