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 |
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 %}