ChatEventBuilder
Defines the fluent API for configuring the Kendo Chat for ASP.NET MVC events.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class ChatEventBuilder : EventBuilder
Inheritance: objectEventBuilderChatEventBuilder
Inherited Members
Constructors
Initializes a new instance of the Chat class.
public ChatEventBuilder(IDictionary<string, object> events)
The client events.
Methods
Fired when an action button is clicked inside an attachment template, or when a suggestedAction is clicked.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases. Use the SuggestionClick and FileMenuAction events instead.")]
public ChatEventBuilder ActionClick(Func<object, object> handler)
The handler code wrapped in a text tag.
Returns:Fired when an action button is clicked inside an attachment template or when a suggestedAction is clicked.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases. Use the SuggestionClick and FileMenuAction events instead.")]
public ChatEventBuilder ActionClick(string handler)
The name of the JavaScript function that will handle the actionClick event.
Returns:Returns the current instance of ChatEventBuilder .
Defines the handler of the ContextMenuAction client-side event. Fired when a message context menu action is executed. This event allows you to handle custom message actions and respond to user interactions with message context menus.
public ChatEventBuilder ContextMenuAction(string handler)
The name of the JavaScript function that will handle the ContextMenuAction event.
Returns:Defines the handler of the Download client-side event. Fired when a download action is triggered, either from the "Download All" button or from a file menu download action.
public ChatEventBuilder Download(string handler)
The name of the JavaScript function that will handle the Download event.
Returns:Defines the handler of the ExecuteAction client-side event. Fired when the user clicks an action button in an attachment card. Use this event to handle custom actions defined in attachment data.
public ChatEventBuilder ExecuteAction(string handler)
The name of the JavaScript function that will handle the ExecuteAction event.
Returns:Defines the handler of the FileMenuAction client-side event. Fired when a file context menu action is executed. This event allows you to handle custom file actions and respond to user interactions with file attachments.
public ChatEventBuilder FileMenuAction(string handler)
The name of the JavaScript function that will handle the FileMenuAction event.
Returns:Defines the handler of the FileRemove client-side event. Fired when the user removes a file attachment.
public ChatEventBuilder FileRemove(string handler)
The name of the JavaScript function that will handle the FileRemove event.
Returns:Defines the handler of the FileSelect client-side event. Fired when the user selects files using the file attachment button.
public ChatEventBuilder FileSelect(string handler)
The name of the JavaScript function that will handle the FileSelect event.
Returns:Defines the handler of the Input client-side event. Fired when the user types in the message input field.
public ChatEventBuilder Input(string handler)
The name of the JavaScript function that will handle the Input event.
Returns:Fired when a message is posted to the chat widget. This can be either through the message box, or an action button click.
Fired when a message is posted to the chat widget. This can be either through the message box, or an action button click.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases. Use the SendMessage event instead.")]
public ChatEventBuilder Post(string handler)
The name of the JavaScript function that will handle the post event.
Returns:Defines the handler of the ReferencedMessageClick client-side event. Fired when the user clicks a pinned message banner or a reply reference.The event payload contains only { id } for both pinned-banner clicks and reply-reference clicks.In endless scrolling mode, the event fires before the Chat attempts to render and scroll to a referenced message that is outside the current batch.The event handler function context (available via the this keyword) will be set to the widget instance.
public ChatEventBuilder ReferencedMessageClick(string handler)
The name of the JavaScript function that will handle the ReferencedMessageClick event.
Returns:Defines the handler of the ResendMessage client-side event. Fired when the user clicks the retry button on a failed message. Use this event to re-attempt message delivery.
public ChatEventBuilder ResendMessage(string handler)
The name of the JavaScript function that will handle the ResendMessage event.
Returns:Defines the handler of the SendMessage client-side event. Fired when the user clicks the action button (send or stop). This is the primary event for handling message submission and stop generation requests.The postMessage method do not trigger this event.
public ChatEventBuilder SendMessage(string handler)
The name of the JavaScript function that will handle the SendMessage event.
Returns:Defines the handler of the SuggestionClick client-side event. Fired when a user clicks a suggestion in the Chat. Global suggestions always trigger this event. Per-message suggestedActions trigger this event when suggestionsBehavior is set to "insert"; otherwise they flow through sendMessage.
public ChatEventBuilder SuggestionClick(string handler)
The name of the JavaScript function that will handle the SuggestionClick event.
Returns:Defines the handler of the ToolbarAction client-side event. Fired when a toolbar action is executed on a message. This event allows you to handle custom toolbar actions and respond to user interactions with message controls.
public ChatEventBuilder ToolbarAction(string handler)
The name of the JavaScript function that will handle the ToolbarAction event.
Returns:Fires when a button from the toolbar is clicked.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases.")]
public ChatEventBuilder ToolClick(Func<object, object> handler)
The handler code wrapped in a text tag.
Returns:Returns the current instance of ChatEventBuilder .
Fires when a button from the toolbar is clicked.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases.")]
public ChatEventBuilder ToolClick(string handler)
The name of the JavaScript function that will handle the toolClick event.
Returns:Returns the current instance of ChatEventBuilder .
Fires when the user clears the chat message box which signals that the user has stopped typing. The event is also triggered when the user submits the currently typed in message.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases. Use the Input event instead.")]
public ChatEventBuilder TypingEnd(Func<object, object> handler)
The handler code wrapped in a text tag.
Returns:Returns the current instance of ChatEventBuilder .
Fires when the user clears the chat message box which signals that the user has stopped typing. The event is also triggered when the user submits the currently typed in message.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases. Use the Input event instead.")]
public ChatEventBuilder TypingEnd(string handler)
The name of the JavaScript function that will handle the typingEnd event.
Returns:Returns the current instance of ChatEventBuilder .
Fires when the user starts typing in the Chat message box. The event is fired only once and not upon each keystroke.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases. Use the Input event instead.")]
public ChatEventBuilder TypingStart(Func<object, object> handler)
The handler code wrapped in a text tag.
Returns:Returns the current instance of ChatEventBuilder .
Fires when the user starts typing in the Chat message box. The event is fired only once and not upon each keystroke.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases. Use the Input event instead.")]
public ChatEventBuilder TypingStart(string handler)
The name of the JavaScript function that will handle the typingStart event.
Returns:Returns the current instance of ChatEventBuilder .
Defines the handler of the Unpin client-side event. Fired when a pinned message is unpinned. This event is triggered when a user clicks the close (X) button on a pinned message.
public ChatEventBuilder Unpin(string handler)
The name of the JavaScript function that will handle the Unpin event.
Returns: