Been trying to determine the correct configuration using tag helpers for the tool tip and so far, documentation nor demos have helped. According to docs, the "content" property could call a script which does not seem to work. Using the property "context-hander" does but ten the template set does not work. GetPersonData below returns a JSON object with one property: EmployeeId.
HTML
<
div
>
<
span
id
=
"PersonInfo"
class
=
"fas fa-info-circle"
> </
span
>
<
kendo-tooltip
name
=
"PersonInfo"
position
=
"bottom"
width
=
"300"
height
=
"300"
content-handler
=
"GetPersonData"
content-template-id
=
"PersonTooltipTemplate"
></
kendo-tooltip
>
</
div
>
JS
function
GetPersonData(e)
{
var
personId = document.getElementById(
"hidPersonId"
).value;
$.ajax(
{
async:
true
,
url:
""
,
data: { id: personId },
contentType:
"application/json"
,
success:
function
(data)
{
return
data;
//{ EmployeeId: "12345" }
},
error:
function
(errorThrown)
{
console.log(
"bad"
);
console.log(errorThrown);
}
});
}
<script type=
"text/x-kendo-template"
id=
"PersonTooltipTemplate"
>
<div class=
"d-flex"
>
<div class=
"col-12 col-md-4 col-lg-4 col-xl-4 order-0"
>
<label class=
"control-label"
>Employee Id</label>
</div>
<div class=
"col-12 col-md-4 col-lg-4 col-xl-4 order-1"
>
#= data.EmployeeId #
</div>
</div>
</script>