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

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

Definition

Constructors

Initializes a new instance of the DrawerEventBuilder class.

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

The Drawer event handlers.

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(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

DrawerEventBuilder

Returns the current instance of DrawerEventBuilder .

Example:
C#
@(Html.Kendo().Drawer()
.Name("drawer")
.Events(events =&gt; events.Hide(@&lt;text&gt;
function(e) {
// Handle the Hide event inline.
}
&lt;/text&gt;)
)
)

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

Returns the current instance of 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(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

DrawerEventBuilder

Returns the current instance of DrawerEventBuilder .

Example:
C#
@(Html.Kendo().Drawer()
.Name("drawer")
.Events(events =&gt; events.ItemClick(@&lt;text&gt;
function(e) {
// Handle the ItemClick event inline.
}
&lt;/text&gt;)
)
)

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

Returns the current instance of 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(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

DrawerEventBuilder

Returns the current instance of DrawerEventBuilder .

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(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

DrawerEventBuilder

Returns the current instance of DrawerEventBuilder .

Example:
C#
@(Html.Kendo().Drawer()
.Name("drawer")
.Events(events =&gt; events.Show(@&lt;text&gt;
function(e) {
// Handle the Show event inline.
}
&lt;/text&gt;)
)
)

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

Returns the current instance of DrawerEventBuilder .

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