New to Telerik UI for ASP.NET CoreStart a free 30-day trial

Events

The Telerik UI ExpansionPanel for ASP.NET Core 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.

Razor
    @(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.

Razor
    @(Html.Kendo().ExpansionPanel()
        .Name("expanionpanel")
        .Events(e => e.Expand(@<text>
                function() {
                    // Handle the Expand event inline.
                }
            </text>)
        )
        ... //Additional configuration
    )

Next Steps

See Also