New to Kendo UI for jQueryStart a free 30-day trial

Specifies a URL or request options from where the AI Assistant Window will load its content.

For URLs which start with a protocol (for example, http://), a container iframe element is automatically created. As this behavior may change in future versions, try to always use the iframe configuration option.

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "productName" },
    { field: "category" }
  ],
  dataSource: [
    { productName: "Tea", category: "Beverages" },
    { productName: "Coffee", category: "Beverages" }
  ],
  ai: {
    aiAssistantWindow: {
      content: {
        url: "https://demos.telerik.com/kendo-ui/content/web/tabstrip/ajax/ajaxContent2.html",
        dataType: "html"
      }
    }
  }
});
</script>

The type of result expected from the remote service. Used values are "html" and "json".

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     aiAssistantWindow: {
       content: {
          url: "https://demos.telerik.com/kendo-ui/content/shared/js/products.js",
          dataType: "json"
        }
      }
   }
});
</script>

If the URL for the AI Assistant Window content contains a protocol, the AI Assistant Window creates an iframe for the content and assumes that the nested page resides in another domain.

If the URL does not contain a protocol, the URL is treated as a local URL which will load a partial view and the AI Assistant Window does not create an iframe for the content.

To control the creation of iframe AI Assistant Window content, you have to explicitly configure the option.

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     aiAssistantWindow: {
       content: {
          url: "https://demos.telerik.com/kendo-ui/content/shared/js/products.js",
          dataType: "json",
          iframe: true
        }
      }
   }
});
</script>

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.

<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>

Specifies the url from which the content is fetched

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     aiAssistantWindow: {
       content: {
          url: "https://demos.telerik.com/kendo-ui/content/web/tabstrip/ajax/ajaxContent2.html"
        }
      }
   }
});
</script>