New to Telerik UI for ASP.NET Core? Download free 30-day trial
ASP.NET Core Chat Data Binding
-
EXAMPLEVIEW SOURCE
- EDIT IN
Also available for:
CLIENT-SIDE API HTML HELPER APIDescription
The Telerik UI for ASP.NET Core Chat supports local and remote data binding that allows you to load messages from a local collection or specify a remote endpoint that returns the underlying data.
To configure the Chat for remote data-binding, you need to specify a remote endpoint or web service returning data in a JSON or JSONP format, and utilize the Telerik UI for ASP.NET Core DataSource as a mediator between the component and the underlying data.
To make the connection to the remote endpoint and process the data properly, the DataSource requires information about the web service URL. Also, you must specify the following options within the Chat configuration that map the Model properties in the data collection:
TextField()AuthorNameField()AuthorIdField()AuthorImageAltTextField()AuthorImageUrlField()TimeStampField()IdField()IsDeletedField()FilesField()IsTypingField()
This example demonstrates how to bind the Chat to remote data by configuring its DataSource().