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

Defines the fluent interface for configuring the Button events.

Definition

Constructors

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

Methods

Defines the inline handler of the Click client-side event

C#
public virtual ButtonEventBuilder Click(Func<object, object> handler)
Parameters:handlerFunc<object, object>

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

Returns:

ButtonEventBuilder

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

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

C#
public virtual ButtonEventBuilder Click(string handler)
Parameters:handlerstring

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

Returns:

ButtonEventBuilder

Example:
C#
@( Html.Kendo().Button()
.Name("Button")
.Events(events =&gt; events.Click("onClick"))
)

Defines the inline handler of the KendoKeydown client-side event

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

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

Returns:

ButtonEventBuilder

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

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

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

Returns:

ButtonEventBuilder