New to Telerik UI for ASP.NET Core? Download free 30-day trial

ChatEventBuilder

Methods

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.

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)

Fires when a message is posted to the Chat. Can be either through the message box, or through 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)

Fires when a message is posted to the Chat. Can be either through the message box, or through 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>
                      ))
                )

SendMessage(System.String)

Fires when a message is posted through the Chat message box.

For more information see SendMessage event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the sendMessage event.

Example


               @(Html.Kendo().Chat()
                     .Name("chat")
                     .Events(events => events.SendMessage("onSendMessage"))
               )

SendMessage(System.Func)

Fires when a message is posted through the Chat message box.

For more information see SendMessage event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


                @(Html.Kendo().Chat()
                      .Name("chat")
                      .Events(events => events.SendMessage(
                           @<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.

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.

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.

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.

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.

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.

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>
                      ))
                )

In this article
Not finding the help you need?