Events
The Telerik UI ExpansionPanel for ASP.NET MVC exposes some events that allow you to control the behavior of the UI component.
For a complete example on the available component events, refer to the demo on using the events of the ExpansionPanel.
Handling by Handler Name
The following example demonstrates how to subscribe to events by a handler name.
@(Html.Kendo().ExpansionPanel()
.Name("expanionpanel")
.Events(e => e.Expand("onExpand"))
... //Additional configuration
)
<script>
function onExpand(e){
// Handle the ExpansionPanel Expand event that triggers when it is expanded.
}
</script>
Handling by Template Delegate
The following example demonstrates how to subscribe to events by a template delegate.
@(Html.Kendo().ExpansionPanel()
.Name("expanionpanel")
.Events(e => e.Expand(@<text>
function() {
// Handle the Expand event inline.
}
</text>)
)
... //Additional configuration
)