New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the Menu events.

Definition

Constructors

C#
public MenuEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

Methods

Defines the inline handler of the Activate client-side event

C#
public virtual MenuEventBuilder Activate(Func<object, object> handler)
Parameters:handlerFunc<object, object>

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Activate(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
.Render();
)

Defines the name of the JavaScript function that will handle the Activate client-side event.

C#
public virtual MenuEventBuilder Activate(string handler)
Parameters:handlerstring

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Activate("onActivate"))
)

Defines the inline handler of the Close client-side event

C#
public virtual MenuEventBuilder Close(Func<object, object> handler)
Parameters:handlerFunc<object, object>

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Close(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
.Render();
)

Defines the name of the JavaScript function that will handle the Close client-side event.

C#
public virtual MenuEventBuilder Close(string handler)
Parameters:handlerstring

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Close("onClose"))
)

Defines the inline handler of the Deactivate client-side event

C#
public virtual MenuEventBuilder Deactivate(Func<object, object> handler)
Parameters:handlerFunc<object, object>

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Deactivate(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
.Render();
)

Defines the name of the JavaScript function that will handle the Deactivate client-side event.

C#
public virtual MenuEventBuilder Deactivate(string handler)
Parameters:handlerstring

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Deactivate("onDeactivate"))
)

Defines the inline handler of the KendoKeydown client-side event

C#
public virtual MenuEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

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

Returns:

MenuEventBuilder

Defines the name of the JavaScript function that will handle the KendoKeydown client-side event.

C#
public virtual MenuEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

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

Returns:

MenuEventBuilder

Defines the inline handler of the Open client-side event

C#
public virtual MenuEventBuilder Open(Func<object, object> handler)
Parameters:handlerFunc<object, object>

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Open(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
.Render();
)

Defines the name of the JavaScript function that will handle the Open client-side event.

C#
public virtual MenuEventBuilder Open(string handler)
Parameters:handlerstring

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Open("onOpen"))
)

Defines the inline handler of the Select client-side event

C#
public virtual MenuEventBuilder Select(Func<object, object> handler)
Parameters:handlerFunc<object, object>

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Select(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
.Render();
)

Defines the name of the JavaScript function that will handle the Select client-side event.

C#
public virtual MenuEventBuilder Select(string handler)
Parameters:handlerstring

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

Returns:

MenuEventBuilder

Example:
C#
@( Html.Kendo().Menu()
.Name("Menu")
.Events(events =&gt; events.Select("onSelect"))
)