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

ContextMenuEventBuilder

Methods

Close(System.String)

Fires before a sub menu or the ContextMenu gets closed. You can cancel this event to prevent closure.

For more information see Close event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().ContextMenu()
                        .Name("ContextMenu")
                        .Events(events => events.Close("onClose"))
            )

Close(System.Func)

Fires before a sub menu or the ContextMenu gets closed. You can cancel this event to prevent closure.

For more information see Close event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag (Razor syntax).

Example


             @( Html.Kendo().ContextMenu()
                       .Name("ContextMenu")
                       .Events(events => events.Close(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )

DataBound(System.String)

Fires when the ContextMenu is bound to the set DataSource.

For more information see DataBound event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().ContextMenu()
                        .Name("ContextMenu")
                        .Events(events => events.DataBound("onDataBound"))
            )

DataBound(System.Func)

Fires when the ContextMenu is bound to the set DataSource.

For more information see DataBound event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @( Html.Kendo().ContextMenu()
                       .Name("ContextMenu")
                       .Events(events => events.DataBound(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )

Open(System.String)

Fires before a sub menu or the ContextMenu gets opened. You can cancel this event to prevent opening the sub menu.

For more information see Open event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().ContextMenu()
                        .Name("ContextMenu")
                        .Events(events => events.Open("onOpen"))
            )

Open(System.Func)

Fires before a sub menu or the ContextMenu gets opened. You can cancel this event to prevent opening the sub menu.

For more information see Open event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @( Html.Kendo().ContextMenu()
                       .Name("ContextMenu")
                       .Events(events => events.Open(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )

Activate(System.String)

Fires when a sub menu or the ContextMenu gets opened and its animation finished.

For more information see Activate event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().ContextMenu()
                        .Name("ContextMenu")
                        .Events(events => events.Activate("onActivate"))
            )

Activate(System.Func)

Fires when a sub menu or the ContextMenu gets opened and its animation finished.

For more information see Activate event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @( Html.Kendo().ContextMenu()
                       .Name("ContextMenu")
                       .Events(events => events.Activate(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )

Deactivate(System.String)

Fires when a sub menu or the ContextMenu gets closed and its animation finished.

For more information see Deactivate event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().ContextMenu()
                        .Name("ContextMenu")
                        .Events(events => events.Deactivate("onDeactivate"))
            )

Deactivate(System.Func)

Fires when a sub menu or the ContextMenu gets closed and its animation finished.

For more information see Deactivate event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @( Html.Kendo().ContextMenu()
                       .Name("ContextMenu")
                       .Events(events => events.Deactivate(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )

Select(System.String)

Fires when a menu item gets selected.

For more information see Select event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().ContextMenu()
                        .Name("ContextMenu")
                        .Events(events => events.Select("onSelect"))
            )

Select(System.Func)

Fires when a menu item gets selected.

For more information see Select event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @( Html.Kendo().ContextMenu()
                       .Name("ContextMenu")
                       .Events(events => events.Select(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )

In this article
Not finding the help you need?