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

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

Definition

Constructors

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

Methods

Defines the handler of the Click client-side event. Fires when the user clicks a command button.

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

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

Returns:

ToolBarEventBuilder

Example:
C#
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Events(e =&gt; e.Click("onClick"))
)

Defines the handler of the Close client-side event. Fires when the SplitButton's popup closes.

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

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

Returns:

ToolBarEventBuilder

Example:
C#
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Events(e =&gt; e.Close("onClose"))
)

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

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

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

Returns:

ToolBarEventBuilder

Defines the handler of the Open client-side event. Fires when the Split Button's popup opens.

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

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

Returns:

ToolBarEventBuilder

Example:
C#
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Events(e =&gt; e.Open("onOpen"))
)

Defines the handler of the OverflowClose client-side event. Fires when the overflow popup container is about to close.

C#
public ToolBarEventBuilder OverflowClose(string handler)
Parameters:handlerstring

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

Returns:

ToolBarEventBuilder

Example:
C#
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Events(e =&gt; e.OverflowClose("onOverflowClose"))
)

Defines the handler of the OverflowOpen client-side event. Fires when the overflow popup container is about to open.

C#
public ToolBarEventBuilder OverflowOpen(string handler)
Parameters:handlerstring

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

Returns:

ToolBarEventBuilder

Example:
C#
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Events(e =&gt; e.OverflowOpen("onOverflowOpen"))
)

Defines the handler of the Toggle client-side event. Fires when the user changes the checked state of a toggle button.

C#
public ToolBarEventBuilder Toggle(string handler)
Parameters:handlerstring

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

Returns:

ToolBarEventBuilder

Example:
C#
@(Html.Kendo().ToolBar()
.Name("toolBar")
.Events(e =&gt; e.Toggle("onToggle"))
)