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

Defines the fluent API for configuring the Kendo Dialog for ASP.NET MVC events.

Definition

Constructors

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

Methods

Defines the handler of the Close client-side event. Triggered when a Dialog is closed (by a user or through the close() method).

C#
public DialogEventBuilder Close(string handler)
Parameters:handlerstring

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

Returns:

DialogEventBuilder

Example:
C#
@(Html.Kendo().Dialog()
.Name("Dialog")
.Visible(true)
.Content("Dialog content")
.Events(events =&gt; events.Close("onClose"))
)

Defines the handler of the Hide client-side event. Triggered when a Dialog has finished its closing animation.

C#
public DialogEventBuilder Hide(string handler)
Parameters:handlerstring

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

Returns:

DialogEventBuilder

Example:
C#
@(Html.Kendo().Dialog()
.Name("Dialog")
.Visible(true)
.Content("Dialog content")
.Events(events =&gt; events.Hide("onHide"))
)

Defines the handler of the InitOpen client-side event. Triggered when a Dialog is opened for the first time (i.e. the open() method is called).

C#
public DialogEventBuilder InitOpen(string handler)
Parameters:handlerstring

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

Returns:

DialogEventBuilder

Example:
C#
@(Html.Kendo().Dialog()
.Name("Dialog")
.Visible(true)
.Content("Dialog content")
.Events(events =&gt; events.InitOpen("onInitOpen"))
)

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

C#
public DialogEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

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

Returns:

DialogEventBuilder

Defines the handler of the Open client-side event. Triggered when a Dialog is opened (i.e. the open() method is called).

C#
public DialogEventBuilder Open(string handler)
Parameters:handlerstring

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

Returns:

DialogEventBuilder

Example:
C#
@(Html.Kendo().Dialog()
.Name("Dialog")
.Visible(true)
.Content("Dialog content")
.Events(events =&gt; events.Open("onOpen"))
)

Defines the handler of the Show client-side event. Triggered when a Dialog has finished its opening animation.

C#
public DialogEventBuilder Show(string handler)
Parameters:handlerstring

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

Returns:

DialogEventBuilder

Example:
C#
@(Html.Kendo().Dialog()
.Name("Dialog")
.Visible(true)
.Content("Dialog content")
.Events(events =&gt; events.Show("onShow"))
)