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

Defines the fluent API for configuring the Telerik UI Drawer for ASP.NET MVC client events.

Definition

Constructors

Initializes a new instance of the Drawer class.

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

The client events.

Methods

Defines the handler of the Hide client-side event. Fired when the Kendo UI Drawer is about to be hidden. The event can be prevented by calling the preventDefault method of the event parameter.

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

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

Returns:

DrawerEventBuilder

Example:
C#
@(Html.Kendo().Drawer()
.Name("drawer")
.Events(events =&gt; events.Hide("onHide"))
)

Defines the handler of the ItemClick client-side event. Fires when the user clicks an item in the Kendo UI Drawer.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public DrawerEventBuilder ItemClick(string handler)
Parameters:handlerstring

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

Returns:

DrawerEventBuilder

Example:
C#
@(Html.Kendo().Drawer()
.Name("drawer")
.Events(events =&gt; events.ItemClick("onItemClick"))
)

Defines the handler of the KendoKeydown client-side event.

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

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

Returns:

DrawerEventBuilder

Returns the current instance of DrawerEventBuilder .

Defines the handler of the Show client-side event. Fires before the Kendo UI Drawer is revealed. The event can be prevented by calling the preventDefault method of the event parameter.

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

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

Returns:

DrawerEventBuilder

Example:
C#
@(Html.Kendo().Drawer()
.Name("drawer")
.Events(events =&gt; events.Show("onShow"))
)