Skip to content

Files

Latest commit

Jan 17, 2024
4d5edb5 · Jan 17, 2024

History

History
64 lines (54 loc) · 1.96 KB
·

File metadata and controls

64 lines (54 loc) · 1.96 KB
·
title page_title description slug position
Events
Events
Learn how to handle the events of the Telerik UI for {{ site.framework }} Responsive Panel component.
htmlhelpers_events_responsive_panel_aspnetcore
2

Events

The Telerik UI Responsive Panel for {{ site.framework }} exposes Open and Close events that allow you to control the behavior of the UI component.

The following example demonstrates how to subscribe to the component events.

    @(Html.Kendo().ResponsivePanel()
        .Name("sidebar")
        .Events(e => 
        {
            e.Open("onOpen");
            e.Close("onClose");
        })
        ... // Other configuration.
    )

    <script>
        function onOpen(e) {
            console.log(e); // Review the event data.
            // Custom logic before the componen opens.
        }

        function onClose(e) {
            console.log(e); // Review the event data.
            // Custom logic before the componen closes.
        }
    </script>

{% if site.core %}

    <kendo-responsivepanel name="slidebar" on-open="onOpen" on-close="onClose">
        <!-- Other configuration -->
    </kendo-responsivepanel>

    <script>
        function onOpen(e) {
            console.log(e); // Review the event data.
            // Custom logic when the componen opens.
        }

        function onClose(e) {
            console.log(e); // Review the event data.
            // Custom logic when the componen closes.
        }
    </script>

{% endif %}

See Also