I'm trying to create a tooltip for my grid like this:
$("#grid").kendoTooltip({
autoHide: true,
showOn: "mouseenter",
width:125,
height:125,
position: "right",
filter: ".k-grid-content a.hasTooltip",
content: kendo.template($("#storeTerritory").html())
});
The 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've setup a sample here:
http://jsbin.com/iJunOsa/21/edit
I get a ReferenceError: Territories is not defined
error in the console when I mouse over on 'Wilton'
Let's say I were to replace the contents of the storeTerritory
template with plain-old HTML, then the tooltip appears:
<p>Wilton</p>
What could the issue be?