ChatEventBuilder
Methods
Input(System.String)
Fired when the user types in the message input field.
For more information see Input event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the input event.
SendMessage(System.String)
Fired when a message is about to be sent or when the send process is triggered. This event allows you to modify the message before it's sent or handle stop generation requests.
For more information see SendMessage event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the sendMessage event.
SuggestionClick(System.String)
Fired when a user clicks on a suggested message or action. This event is useful for tracking user engagement with suggestions and handling custom suggestion logic.
For more information see SuggestionClick event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the suggestionClick event.
Unpin(System.String)
Fired when a pinned message is unpinned. This event is triggered when a user clicks the close (X) button on a pinned message.
For more information see Unpin event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the unpin event.
ToolbarAction(System.String)
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.
For more information see ToolbarAction event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the toolbarAction event.
FileMenuAction(System.String)
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.
For more information see FileMenuAction event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the fileMenuAction event.
ContextMenuAction(System.String)
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.
For more information see ContextMenuAction event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the contextMenuAction event.
Download(System.String)
Fired when a download action is triggered, either from the "Download All" button or from a file menu download action.
For more information see Download event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the download event.
ActionClick(System.String)
Fired when an action button is clicked inside an attachment template or when a suggestedAction is clicked.
For more information see ActionClick event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the actionClick event.
RETURNS
Returns the current instance of ChatEventBuilder .
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.ActionClick("onActionClick"))
)
ActionClick(System.Func)
Fired when an action button is clicked inside an attachment template, or when a suggestedAction is clicked.
For more information see ActionClick event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.ActionClick(
@<text>
function(e) {
// event handling code
}
</text>
))
)
Post(System.String)
Fired when a message is posted to the chat widget. This can be either through the message box, or an action button click.
For more information see Post event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the post event.
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.Post("onPost"))
)
Post(System.Func)
Fired when a message is posted to the chat widget. This can be either through the message box, or an action button click.
For more information see Post event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.Post(
@<text>
function(e) {
// event handling code
}
</text>
))
)
TypingEnd(System.String)
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.
For more information see TypingEnd event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the typingEnd event.
RETURNS
Returns the current instance of ChatEventBuilder .
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.TypingEnd("onTypingEnd"))
)
TypingEnd(System.Func)
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.
For more information see TypingEnd event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
RETURNS
Returns the current instance of ChatEventBuilder .
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.TypingEnd(
@<text>
function(e) {
// event handling code
}
</text>
))
)
TypingStart(System.String)
Fires when the user starts typing in the Chat message box. The event is fired only once and not upon each keystroke.
For more information see TypingStart event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the typingStart event.
RETURNS
Returns the current instance of ChatEventBuilder .
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.TypingStart("onTypingStart"))
)
TypingStart(System.Func)
Fires when the user starts typing in the Chat message box. The event is fired only once and not upon each keystroke.
For more information see TypingStart event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
RETURNS
Returns the current instance of ChatEventBuilder .
Example
@(Html.Kendo().Chat()
.Name("chat")
.Events(events => events.TypingStart(
@<text>
function(e) {
// event handling code
}
</text>
))
)
ToolClick(System.String)
Fires when a button from the toolbar is clicked.
For more information see ToolClick event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the toolClick event.
RETURNS
Returns the current instance of ChatEventBuilder .
Example
@(Html.Kendo().Chat()
.Name("chat")
.Toolbar(toolbar =>
{
toolbar.Toggleable(true);
toolbar.Buttons(buttons =>
{
buttons.Add().Name("sendimage").IconClass("k-icon k-i-image");
});
})
.Events(e =>
{
e.ToolClick("onToolClick");
})
)
ToolClick(System.Func)
Fires when a button from the toolbar is clicked.
For more information see ToolClick event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
RETURNS
Returns the current instance of ChatEventBuilder .
Example
@(Html.Kendo().Chat()
.Name("chat")
.Toolbar(toolbar =>
{
toolbar.Toggleable(true);
toolbar.Buttons(buttons =>
{
buttons.Add().Name("sendimage").IconClass("k-icon k-i-image");
});
})
.Events(events => events.ToolClick(
@<text>
function(e) {
// event handling code
}
</text>
))
)