setDataSource
Sets a new data source for the Chat component.
Parameters
dataSource kendo.data.DataSource|Object|Array
The new data source configuration or instance.
Example
<div id="chat"></div> <script> let chat = $("#chat").kendoChat().data("kendoChat"); let newMessagesData = [ { id: 1, text: "New message", authorId: "user1", authorName: "John", timestamp: new Date() } ]; chat.setDataSource(newMessagesData); </script> In this article