ai.aiAssistantWindow.content.templateString
The template for the content of a AI Assistant Window. Returned data from the server will be given as the data
of this template.
If the returned data is JSON, the dataType
parameter has to be passed so that the data gets parsed by jQuery.
If the URL contains a protocol, set iframe
to false
. Otherwise, the JSON response will be injected in the content area of the AI Assistant Window as is.
Example - displaying a template
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [{ field: "name" }],
dataSource: [{ name: "Jane Doe" }],
toolbar: ["aiAssistant"],
ai: {
aiAssistantWindow: {
content: {
template: "<div class='k-ai-assistant'></div>"
},
open: (e) => {
const el = e.sender.element.find(".k-ai-assistant");
el.kendoChat();
}
}
}
});
</script>
In this article