smartBox.semanticSearch
Fired when the user performs a search in the SmartBox Semantic Search mode. Use this event to handle semantic search requests with your AI service.
Example - handle semantic search event
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "ProductName" },
{ field: "UnitPrice" }
],
dataSource: {
data: [
{ ProductName: "Tea", UnitPrice: 10 },
{ ProductName: "Coffee", UnitPrice: 15 }
]
},
search: {
fields: [{ name: "ProductName", operator: "contains" }]
},
toolbar: ["smartBox"],
smartBox: {
semanticSearchSettings: {
enabled: true
},
semanticSearch: function(e) {
console.log("Semantic search value:", e.searchValue);
}
}
});
</script>