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

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

Definition

Constructors

Initializes a new instance of the DropDownButtonEventBuilder class.

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

The DropDownButton event handlers.

Methods

Defines the handler of the Click client-side event. Fires when the DropDownButton or any if its items is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the DropDownButton or an item is focused.

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

The handler code wrapped in a text tag.

Returns:

DropDownButtonEventBuilder

Returns the current instance of DropDownButtonEventBuilder .

Example:
C#
@(Html.Kendo().DropDownButton()
.Name("dropdownbutton")
.Events(events =&gt; events.Click(
@%lt;text&gt;
function() {
// Handle event.
}
&lt;/text&gt;
)
)
)

Defines the handler of the Click client-side event. Fires when the DropDownButton or any if its items is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the DropDownButton or an item is focused.

C#
public DropDownButtonEventBuilder Click(string handler)
Parameters:handlerstring

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

Returns:

DropDownButtonEventBuilder

Returns the current instance of DropDownButtonEventBuilder .

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

Defines the handler of the Close client-side event. Fires when the menu button is closed.

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

The handler code wrapped in a text tag.

Returns:

DropDownButtonEventBuilder

Returns the current instance of DropDownButtonEventBuilder .

Example:
C#
@(Html.Kendo().DropDownButton()
.Name("dropdownbutton")
.Events(events =&gt; events.Close(
@%lt;text&gt;
function() {
// Handle event.
}
&lt;/text&gt;
)
)
)

Defines the handler of the Close client-side event. Fires when the menu button is closed.

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

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

Returns:

DropDownButtonEventBuilder

Returns the current instance of DropDownButtonEventBuilder .

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

Defines the handler of the Open client-side event. Fires when the menu button is opened.

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

The handler code wrapped in a text tag.

Returns:

DropDownButtonEventBuilder

Returns the current instance of DropDownButtonEventBuilder .

Example:
C#
@(Html.Kendo().DropDownButton()
.Name("dropdownbutton")
.Events(events =&gt; events.Open(
@%lt;text&gt;
function() {
// Handle event.
}
&lt;/text&gt;
)
)
)

Defines the handler of the Open client-side event. Fires when the menu button is opened.

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

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

Returns:

DropDownButtonEventBuilder

Returns the current instance of DropDownButtonEventBuilder .

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