ChatBuilder
Methods
MessageGroupTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render message groups.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagegrouptemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageReferenceTemplateId(System.String)
The template used to render message references (replies and pinned messages).
Parameters
templateId - System.String
The ID of the template element for MessageReferenceTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageReferenceTemplateHandler(System.String)
The template used to render message references (replies and pinned messages).
Parameters
templateHandler - System.String
The handler that returs the template for MessageReferenceTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageReferenceTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render message references (replies and pinned messages).
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagereferencetemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageTemplateId(System.String)
The template used to render individual messages.
Parameters
templateId - System.String
The ID of the template element for MessageTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageTemplateHandler(System.String)
The template used to render individual messages.
Parameters
templateHandler - System.String
The handler that returs the template for MessageTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render individual messages.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagetemplate.
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsTemplateId(System.String)
The template used to render suggested actions.
Parameters
templateId - System.String
The ID of the template element for SuggestedActionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsTemplateHandler(System.String)
The template used to render suggested actions.
Parameters
templateHandler - System.String
The handler that returs the template for SuggestedActionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render suggested actions.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the suggestedactionstemplate.
RETURNS
Returns the current ChatBuilder instance.
SuggestionsTemplateId(System.String)
The template used to render message suggestions.
Parameters
templateId - System.String
The ID of the template element for SuggestionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestionsTemplateHandler(System.String)
The template used to render message suggestions.
Parameters
templateHandler - System.String
The handler that returs the template for SuggestionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestionsTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render message suggestions.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the suggestionstemplate.
RETURNS
Returns the current ChatBuilder instance.
TimestampTemplateId(System.String)
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
Parameters
templateId - System.String
The ID of the template element for TimestampTemplate
RETURNS
Returns the current ChatBuilder instance.
TimestampTemplateHandler(System.String)
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
Parameters
templateHandler - System.String
The handler that returs the template for TimestampTemplate
RETURNS
Returns the current ChatBuilder instance.
TimestampTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the timestamptemplate.
RETURNS
Returns the current ChatBuilder instance.
ActionButton(System.Action)
Configures the action button (send/stop button) in the message input area. Allows customization of icons, text labels, and loading state appearance.
Parameters
configurator - System.Action<ChatActionButtonSettingsBuilder>
The action that configures the actionbutton.
AllowMessageCollapse(System.Boolean)
Enables or disables message collapsing functionality for expandable messages. When enabled, long messages can be collapsed to save screen space.
Parameters
value - System.Boolean
The value that configures the allowmessagecollapse.
AttachmentLayout(Kendo.Mvc.UI.ChatAttachmentLayout)
Sets the default layout mode for rich attachments (cards, images) within messages. Individual messages can override this setting via their attachmentLayout data property.
Parameters
value - ChatAttachmentLayout
The value that configures the attachmentlayout.
AttachmentLayoutField(System.String)
The field of the message data item that provides the attachment layout mode for that specific message. Allows per-message override of the global attachmentLayout setting.
Parameters
value - System.String
The value that configures the attachmentlayoutfield.
AttachmentsField(System.String)
The field of the message data item that provides the rich attachments array. Each attachment object can contain contentType, title, subtitle, thumbnailUrl, and actions properties.
Parameters
value - System.String
The value that configures the attachmentsfield.
AttachmentTemplateHandler(System.String)
The template used to render individual attachments within messages. Receives the attachment data object and should return an HTML string. When not set, the default attachment rendering is used.The function receives the attachment object with properties such as title, subtitle, image, contentType, and content.
Parameters
value - System.String
The value that configures the attachmenttemplate.
AttachmentTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render individual attachments within messages. Receives the attachment data object and should return an HTML string. When not set, the default attachment rendering is used.The function receives the attachment object with properties such as title, subtitle, image, contentType, and content.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the attachmenttemplate.
AutoBind(System.Boolean)
Controls whether the Chat will automatically fetch data from the data source when initialized. When set to false, you must manually call the data source's fetch() method.
Parameters
value - System.Boolean
The value that configures the autobind.
AutoAssignId(System.Boolean)
Enables or disables automatic assignment of a unique ID to each message posted in the chat. When enabled, messages without an explicit ID will be assigned a generated unique identifier.This option should be set to false if the chat is configured to work with a remote data source and the messages are created on the server. In that case, the id should be assigned on the server itself.
Parameters
value - System.Boolean
The value that configures the autoassignid.
AuthorId(System.String)
Specifies the unique identifier of the current user. If not set, a GUID will be generated automatically. This determines which messages are displayed as "own messages" (right-aligned) versus "other messages" (left-aligned).
Parameters
value - System.String
The value that configures the authorid.
AuthorIdField(System.String)
Specifies the field name in the data source from which the message author's unique identifier will be read.
Parameters
value - System.String
The value that configures the authoridfield.
AuthorImageAltTextField(System.String)
Specifies the field name in the data source from which the alt text for the author's avatar image will be read.
Parameters
value - System.String
The value that configures the authorimagealttextfield.
AuthorImageUrlField(System.String)
Specifies the field name in the data source from which the URL for the author's avatar image will be read.
Parameters
value - System.String
The value that configures the authorimageurlfield.
AuthorNameField(System.String)
Specifies the field name in the data source from which the author's display name will be read.
Parameters
value - System.String
The value that configures the authornamefield.
AuthorMessageSettings(System.Action)
User-specific message settings applied to messages sent by the current user (author). These settings override the global display options like showAvatar, showUsername, and messageWidthMode for author messages only. See also receiverMessageSettings.The object accepts the following properties: showAvatar - Boolean - Whether to show the avatar for author messages.; showUsername - Boolean - Whether to show the username for author messages.; messageWidthMode - String - Message width mode: "standard" or "full".; allowMessageCollapse - Boolean - Whether author messages can be collapsed.; messageTemplate - Function - Template override for author messages. Receives the same arguments as messageTemplate.; messageContentTemplate - Function - Content template override for author messages. Receives the current message object.; enableFileActions - Boolean - Whether file actions are enabled for author messages.; enableContextMenuActions - Boolean - Whether context menu actions are enabled for author messages.; messageToolbarActions - Array - Toolbar actions specific to author messages. or messageActions - Array - Context menu actions specific to author messages..
Parameters
configurator - System.Action<ChatMessageSettingsBuilder>
The action that configures the authormessagesettings.
FailedField(System.String)
The field of the message data item that provides the failed flag. When true, the message is rendered with a failed state indicator and a retry button.
Parameters
value - System.String
The value that configures the failedfield.
FileActions(System.Action)
Defines the collection of actions that will be rendered in the context menu for file attachments. Each action represents an operation that users can perform on files (download, delete, preview, etc.).
Parameters
configurator - System.Action<ChatFileActionFactory>
The action that configures the fileactions.
FileAttachment(System.Boolean)
Configures the file select button (attachment button) in the message input area. Can be set to: true: Shows the button with default settings; false: Hides the button completely (does not render) or Object: Shows the button with custom configuration.
Parameters
enabled - System.Boolean
Enables or disables the fileattachment option.
FileAttachment(System.Action)
Configures the file select button (attachment button) in the message input area. Can be set to: true: Shows the button with default settings; false: Hides the button completely (does not render) or Object: Shows the button with custom configuration.
Parameters
configurator - System.Action<ChatFileAttachmentSettingsBuilder>
The action that configures the fileattachment.
FilesField(System.String)
Specifies the field name in the data source from which the array of files attached to a message will be read.
Parameters
value - System.String
The value that configures the filesfield.
FilesLayoutMode(Kendo.Mvc.UI.ChatFilesLayout)
Controls the layout mode for file attachments within messages. Available modes are "vertical" (stacked), "horizontal" (side-by-side with scrolling), and "wrap" (wrapping flow layout).
Parameters
value - ChatFilesLayout
The value that configures the fileslayoutmode.
HeaderTemplateHandler(System.String)
A custom template function for rendering the chat header. When set, this overrides the headerItems configuration and provides full control over the header content. The function should return an HTML string.
Parameters
value - System.String
The value that configures the headertemplate.
HeaderTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering the chat header. When set, this overrides the headerItems configuration and provides full control over the header content. The function should return an HTML string.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the headertemplate.
Height(System.String)
Sets the height of the Chat component.
Parameters
value - System.String
The value that configures the height.
IdField(System.String)
Specifies the field name in the data source from which the unique identifier for each message will be read.
Parameters
value - System.String
The value that configures the idfield.
IsDeletedField(System.String)
Specifies the field name in the data source that indicates whether a message has been deleted.
Parameters
value - System.String
The value that configures the isdeletedfield.
IsPinnedField(System.String)
Specifies the field name in the data source that indicates whether a message is pinned.
Parameters
value - System.String
The value that configures the ispinnedfield.
IsTypingField(System.String)
Specifies the field name in the data source that indicates whether a message is currently being typed.
Parameters
value - System.String
The value that configures the istypingfield.
Loading(System.Boolean)
Sets the initial loading state of the Chat component. When true, the send button displays a loading/stop indicator instead of the send icon. This is useful for AI chat applications where generating responses takes time. See also the loading method for toggling this state at runtime.
Parameters
value - System.Boolean
The value that configures the loading.
MessageActions(System.Action)
Defines the collection of actions that will be rendered in the context menu for messages. By default, the Chat includes four actions: Reply, Copy, and Pin. You can customize this list by providing your own actions or combining default actions with custom ones.Default actions: { name: "reply", text: "Reply", icon: "undo" }; { name: "copy", text: "Copy", icon: "copy" }; { name: "pin", text: "Pin", icon: "pin" } or { name: "delete", text: "Delete", icon: "trash" }.
Parameters
configurator - System.Action<ChatMessageActionFactory>
The action that configures the messageactions.
Messages(System.Action)
Allows localization of the strings that are used in the component.
Parameters
configurator - System.Action<ChatMessagesSettingsBuilder>
The action that configures the messages.
MessageBox(System.Action)
Configures the message input box (PromptBox) settings. Allows customization of the input mode, rows, height, and nested file select button settings.
Parameters
configurator - System.Action<ChatMessageBoxSettingsBuilder>
The action that configures the messagebox.
MessageContentTemplateHandler(System.String)
A custom template function for rendering the content area inside message bubbles. This template controls only the text/content portion of messages, not the entire message group structure. When set, it is used for both author and receiver messages unless overridden by authorMessageSettings.messageContentTemplate or receiverMessageSettings.messageContentTemplate.
Parameters
value - System.String
The value that configures the messagecontenttemplate.
MessageContentTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering the content area inside message bubbles. This template controls only the text/content portion of messages, not the entire message group structure. When set, it is used for both author and receiver messages unless overridden by authorMessageSettings.messageContentTemplate or receiverMessageSettings.messageContentTemplate.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagecontenttemplate.
MessageStatusSettings(System.Action)
Custom settings for message status display, allowing you to configure icons, text, and CSS classes for each message delivery status. The object should be a mapping from status values ("sent", "delivered", "seen", "failed") to settings objects.Each status settings object accepts: icon - String - Font icon name to display.; text - String - Text label for the status. or cssClass - String - Additional CSS class to apply to the status element..
Parameters
configurator - System.Action<ChatMessageStatusSettingsSettingsBuilder>
The action that configures the messagestatussettings.
MessageStatusTemplateHandler(System.String)
A custom template function for rendering message status indicators. Receives a context object with status (the status string) and message (the message object). When set, this overrides the default status rendering and messageStatusSettings.
Parameters
value - System.String
The value that configures the messagestatustemplate.
MessageStatusTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering message status indicators. Receives a context object with status (the status string) and message (the message object). When set, this overrides the default status rendering and messageStatusSettings.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagestatustemplate.
MessageBoxTemplateHandler(System.String)
The template used to render the message input area at the bottom of the Chat. The function receives no arguments and should return an HTML string for the custom message box markup.When using a custom template, the first textarea or supported text input inside the template is used as the message input. To enable send button behavior, add an element with the ref-chat-message-box-send-button attribute. If the template contains input[type='file'] elements, they participate in the file selection flow.
Parameters
value - System.String
The value that configures the messageboxtemplate.
MessageBoxTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render the message input area at the bottom of the Chat. The function receives no arguments and should return an HTML string for the custom message box markup.When using a custom template, the first textarea or supported text input inside the template is used as the message input. To enable send button behavior, add an element with the ref-chat-message-box-send-button attribute. If the template contains input[type='file'] elements, they participate in the file selection flow.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messageboxtemplate.
MessageTimeFormat(System.String)
The format string used to display message timestamps.
Parameters
value - System.String
The value that configures the messagetimeformat.
MessageToolbarActions(System.Action)
Defines the collection of actions that will be rendered in the message toolbar.
Parameters
configurator - System.Action<ChatMessageToolbarActionFactory>
The action that configures the messagetoolbaractions.
NoDataTemplateHandler(System.String)
A custom template function for rendering an empty state when the chat has no messages. When set, the template output is displayed in place of the empty message list area, providing a visual cue that the conversation has not started yet.
Parameters
value - System.String
The value that configures the nodatatemplate.
NoDataTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering an empty state when the chat has no messages. When set, the template output is displayed in place of the empty message list area, providing a visual cue that the conversation has not started yet.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the nodatatemplate.
ScrollToBottomButton(System.Boolean)
Shows or hides the scroll-to-bottom button that appears when the user scrolls up in the message list.
Parameters
value - System.Boolean
The value that configures the scrolltobottombutton.
AutoScrollThreshold(System.Double)
Defines the amount of space that is preserved above a newly auto-scrolled incoming message when the user is already near the bottom of the message list. Accepts either a pixel value or a percentage of the visible message list area.
Parameters
value - System.Double
The value that configures the autoscrollthreshold.
ShowAvatar(System.Boolean)
Controls whether avatars are displayed next to messages. This is a global setting that can be overridden per-user via authorMessageSettings and receiverMessageSettings.
Parameters
value - System.Boolean
The value that configures the showavatar.
ShowUsername(System.Boolean)
Controls whether usernames are displayed above messages. This is a global setting that can be overridden per-user via authorMessageSettings and receiverMessageSettings.
Parameters
value - System.Boolean
The value that configures the showusername.
SkipSanitization(System.Boolean)
Controls whether HTML sanitization is skipped when rendering message content. When set to true, the Chat component will not automatically encode HTML entities in message text, allowing for rich HTML content to be displayed. This is useful when integrating with markdown parsers or when you need to display pre-formatted HTML content.Warning: Setting this to true can introduce security vulnerabilities if user input is not properly sanitized elsewhere in your application. Only use this option when you trust the content source or have implemented your own sanitization logic.
Parameters
value - System.Boolean
The value that configures the skipsanitization.
ReplyToIdField(System.String)
Specifies the field name in the data source that contains the ID of the message being replied to.
Parameters
value - System.String
The value that configures the replytoidfield.
ReceiverMessageSettings(System.Action)
User-specific message settings applied to messages received from other users. These settings override the global display options like showAvatar, showUsername, and messageWidthMode for receiver messages only. See also authorMessageSettings.The object accepts the following properties: showAvatar - Boolean - Whether to show the avatar for receiver messages.; showUsername - Boolean - Whether to show the username for receiver messages.; messageWidthMode - String - Message width mode: "standard" or "full".; allowMessageCollapse - Boolean - Whether receiver messages can be collapsed.; messageTemplate - Function - Template override for receiver messages. Receives the same arguments as messageTemplate.; messageContentTemplate - Function - Content template override for receiver messages. Receives the current message object.; enableFileActions - Boolean - Whether file actions are enabled for receiver messages.; enableContextMenuActions - Boolean - Whether context menu actions are enabled for receiver messages.; messageToolbarActions - Array - Toolbar actions specific to receiver messages. or messageActions - Array - Context menu actions specific to receiver messages..
Parameters
configurator - System.Action<ChatMessageSettingsBuilder>
The action that configures the receivermessagesettings.
SpeechToText(System.Boolean)
Configures speech-to-text functionality in the message input. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
Parameters
enabled - System.Boolean
Enables or disables the speechtotext option.
SpeechToText(System.Action)
Configures speech-to-text functionality in the message input. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
Parameters
configurator - System.Action<ChatSpeechToTextSettingsBuilder>
The action that configures the speechtotext.
SuggestedActionsLayoutMode(Kendo.Mvc.UI.SuggestionsLayoutMode)
Layout mode for suggested actions.
Parameters
value - SuggestionsLayoutMode
The value that configures the suggestedactionslayoutmode.
SuggestedActionsScrollable(System.Boolean)
Enables or disables scrollable behavior for suggested actions.
Parameters
value - System.Boolean
The value that configures the suggestedactionsscrollable.
Suggestions(System.Action)
Defines the collection of suggested messages that users can quickly select. These appear as clickable buttons below the message input area, allowing users to send common responses quickly.
Parameters
configurator - System.Action<ChatSuggestionFactory>
The action that configures the suggestions.
SuggestionsBehavior(Kendo.Mvc.UI.ChatSuggestionsBehavior)
Controls what happens when a user selects a message suggestion. Supported values: "send": The suggestion text is immediately sent as a message. or "insert": The suggestion text is inserted into the message box input, allowing the user to edit it before sending..
Parameters
value - ChatSuggestionsBehavior
The value that configures the suggestionsbehavior.
SuggestionsLayoutMode(Kendo.Mvc.UI.SuggestionsLayoutMode)
The layout mode for the message box suggestions.
Parameters
value - SuggestionsLayoutMode
The value that configures the suggestionslayoutmode.
SuggestionsScrollable(System.Boolean)
Enables or disables scrollable behavior for message suggestions.
Parameters
value - System.Boolean
The value that configures the suggestionsscrollable.
TextField(System.String)
Specifies the field name in the data source from which the message text content will be read.
Parameters
value - System.String
The value that configures the textfield.
StatusField(System.String)
Specifies the field name in the data source from which the message status will be read. The status describes the delivery state of the message (e.g. "Sending", "Sent", "Delivered", "Seen", "Failed"). See also messageStatusSettings.
Parameters
value - System.String
The value that configures the statusfield.
TimestampField(System.String)
Specifies the field name in the data source from which the message timestamp will be read.
Parameters
value - System.String
The value that configures the timestampfield.
TimestampVisibility(Kendo.Mvc.UI.ChatTimestampVisibility)
Controls the visibility of message timestamps. Supported values: "onFocus": Timestamps are only visible for selected/focused messages (default behavior). or "hidden": Timestamps are never visible for any messages..
Parameters
value - ChatTimestampVisibility
The value that configures the timestampvisibility.
UserStatusTemplateHandler(System.String)
The template used to render the user status content shown next to the latest message in a receiver group. The function receives a context object with a message field, where message.author contains the normalized author data, and should return an HTML string.
Parameters
value - System.String
The value that configures the userstatustemplate.
UserStatusTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render the user status content shown next to the latest message in a receiver group. The function receives a context object with a message field, where message.author contains the normalized author data, and should return an HTML string.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the userstatustemplate.
Width(System.String)
Sets the width of the Chat component.
Parameters
value - System.String
The value that configures the width.
Dir(Kendo.Mvc.UI.TextDirection)
Specifies the text direction of the Chat.
Parameters
value - TextDirection
The value that configures the dir.
User(System.Action)
Configures the user information of the Chat.
Parameters
configurator - System.Action<ChatUserSettingsBuilder>
The configurator for the user setting.
RETURNS
Returns the current instance of ChatBuilder .
Toolbar(System.Action)
Configures the toolbar of the Chat.
Parameters
configurator - System.Action<ChatToolbarSettingsBuilder>
The configurator for the toolbar setting.
RETURNS
Returns the current instance of ChatBuilder .
BindTo(System.Collections.Generic.IEnumerable)
Binds the component to an IEnumerable collection.
Parameters
data - System.Collections.Generic.IEnumerable<ChatMessage>
The IEnumerable collection.
RETURNS
Returns the current ChatBuilder instance.
Example
@(Html.Kendo().Chat()
.Name("chat")
.BindTo(new List<ChatMessage>
{
new ChatMessage { Text = "Text1" },
new ChatMessage { Text = "Text2" }
}))
DataSource(System.Action)
Sets the DataSource configuration of the Chat for remote data binding.
Parameters
configurator - System.Action<DataSourceBuilder>
The action that configures the DataSource.
RETURNS
Returns the current ChatBuilder instance.
Example
@(Html.Kendo().Chat()
.Name("chat")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetChatMessages", "Home");
})
})
)
DataSource(System.String)
Sets the DataSource configuration of the Chat for remote data binding.
Parameters
dataSourceId - System.String
The dataSource id that configures the DataSource.
RETURNS
Returns the current ChatBuilder instance.
Example
@(Html.Kendo().Chat()
.Name("chat")
.DataSource("myDataSource")
)
MessageWidthMode(Kendo.Mvc.UI.ChatMessageWidth)
Sets the messages width mode.
Parameters
mode - ChatMessageWidth
RETURNS
Returns the current ChatBuilder instance.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<ChatEventBuilder>
The client events action.
Example
@(Html.Kendo().Chat()
.Name("Chat")
.Events(events => events
.Input("onInput")
)
)
HeaderItems(System.Action)
Defines the collection of items that will be rendered in the Chat header. Each item represents a component or content that appears in the header area above the message list. The items follow the same structure as AppBar items.
Parameters
configurator - System.Action<AppBarItemFactory>
The configurator for the header items setting.
RETURNS
Returns the current instance of ChatBuilder .
FilesTemplateId(System.String)
The template used to render file attachments in messages.
Parameters
templateId - System.String
The ID of the template element for FilesTemplate
RETURNS
Returns the current ChatBuilder instance.
FilesTemplateHandler(System.String)
The template used to render file attachments in messages.
Parameters
templateHandler - System.String
The handler that returs the template for FilesTemplate
RETURNS
Returns the current ChatBuilder instance.
FilesTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render file attachments in messages.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the filestemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageGroupTemplateId(System.String)
The template used to render message groups.
Parameters
templateId - System.String
The ID of the template element for MessageGroupTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageGroupTemplateHandler(System.String)
The template used to render message groups.
Parameters
templateHandler - System.String
The handler that returs the template for MessageGroupTemplate
RETURNS
Returns the current ChatBuilder instance.
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.