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

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

Definition

Constructors

Initializes a new instance of the ExpansionPanelEventBuilder class.

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

The ExpansionPanel event handlers.

Methods

Defines the handler of the Collapse client-side event. Fired when the widget is collapsed.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ExpansionPanelEventBuilder Collapse(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .

Example:
C#
@(Html.Kendo().ExpansionPanel()
.Name("expansionPanel")
.Events(events =&gt; events.Collapse(
@&lt;text&gt;
function(e){
// Handle event.
}
&lt;/text&gt;
))
)

Defines the handler of the Collapse client-side event. Fired when the widget is collapsed.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ExpansionPanelEventBuilder Collapse(string handler)
Parameters:handlerstring

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

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .

Example:
C#
@(Html.Kendo().ExpansionPanel()
.Name("expansionPanel")
.Events(events =&gt; events.Collapse("onCollapse"))
)

Defines the handler of the Complete client-side event. Fired when the animation during collapse/expand is completed.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ExpansionPanelEventBuilder Complete(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .

Example:
C#
@(Html.Kendo().ExpansionPanel()
.Name("expansionPanel")
.Events(events =&gt; events.Complete(
@&lt;text&gt;
function(e){
// Handle event.
}
&lt;/text&gt;
))
)

Defines the handler of the Complete client-side event. Fired when the animation during collapse/expand is completed.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ExpansionPanelEventBuilder Complete(string handler)
Parameters:handlerstring

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

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .

Example:
C#
@(Html.Kendo().ExpansionPanel()
.Name("expansionPanel")
.Events(events =&gt; events.Complete("onCollapse"))
)

Defines the handler of the Expand client-side event. Fired when the widget is expanded.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ExpansionPanelEventBuilder Expand(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .

Example:
C#
@(Html.Kendo().ExpansionPanel()
.Name("expansionPanel")
.Events(events =&gt; events.Expand(
@&lt;text&gt;
function(e){
// Handle event.
}
&lt;/text&gt;
))
)

Defines the handler of the Expand client-side event. Fired when the widget is expanded.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ExpansionPanelEventBuilder Expand(string handler)
Parameters:handlerstring

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

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .

Example:
C#
@(Html.Kendo().ExpansionPanel()
.Name("expansionPanel")
.Events(events =&gt; events.Expand("onExpand"))
)

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

C#
public ExpansionPanelEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .

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

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

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

Returns:

ExpansionPanelEventBuilder

Returns the current instance of ExpansionPanelEventBuilder .