MenuEventBuilder

Methods

Close(System.String)

Defines the handler of the Close client-side event. Fires before a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Events(events => events.Close("handler"))
            )
             

Close(System.Func)

Defines the handler of the Close client-side event. Fires before a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

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

DataBound(System.String)

Defines the handler of the DataBound client-side event. Fires when the Menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Events(events => events.DataBound("handler"))
            )
             

DataBound(System.Func)

Defines the handler of the DataBound client-side event. Fires when the Menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

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

Open(System.String)

Defines the handler of the Open client-side event. Fires before a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Events(events => events.Open("handler"))
            )
             

Open(System.Func)

Defines the handler of the Open client-side event. Fires before a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

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

Activate(System.String)

Defines the handler of the Activate client-side event. Fires when a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Events(events => events.Activate("handler"))
            )
             

Activate(System.Func)

Defines the handler of the Activate client-side event. Fires when a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

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

Deactivate(System.String)

Defines the handler of the Deactivate client-side event. Fires when a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Events(events => events.Deactivate("handler"))
            )
             

Deactivate(System.Func)

Defines the handler of the Deactivate client-side event. Fires when a sub menu 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

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

Select(System.String)

Defines the handler of the Select client-side event. 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Events(events => events.Select("handler"))
            )
             

Select(System.Func)

Defines the handler of the Select client-side event. 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.

RETURNS

Returns the current instance of MenuEventBuilder .

Example

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

KendoKeydown(System.String)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Menu is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see KendoKeydown event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of MenuEventBuilder .

KendoKeydown(System.Func)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Menu is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see KendoKeydown event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of MenuEventBuilder .