title | page_title | description | slug | position |
---|---|---|---|---|
Events |
Events |
Learn how to handle the events of the Telerik UI for {{ site.framework }} PivotGridV2 component. |
htmlhelpers_events_pivotgridv2_aspnetcore |
7 |
The Telerik UI PivotGridV2 for {{ site.framework }} exposes multiple events that allow you to control the behavior of the UI component.
The following example demonstrates how you can subscribe to the ExpandMember
and CollapseMember
events of the component.
@(Html.Kendo().PivotGridV2()
.Name("pivotgrid")
.Events(e =>
{
e.ExpandMember("onExpandMember");
e.CollapseMember("onCollapseMember");
})
... // Other configuration.
)
<script>
function onExpandMember(e) {
console.log(e); // Review the event data.
// Custom logic when a specified column or row field is expanded.
}
function onCollapseMember() {
console.log(e); // Review the event data.
// Custom logic before a specified column or row field is collapsed.
}
</script>
{% if site.core %}
<kendo-pivotgridv2 name="pivotgrid" on-expand-member="onExpandMember" on-collapse-member="onCollapseMember">
</kendo-pivotgridv2>
<script>
function onExpandMember(e) {
console.log(e); // Review the event data.
// Custom logic when a specified column or row field is expanded.
}
function onCollapseMember() {
console.log(e); // Review the event data.
// Custom logic before a specified column or row field is collapsed.
}
</script>
{% endif %}
- [Using the Keyboard Navigation of the PivotGridV2 for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/pivotgridv2/keyboard-navigation)
- Client-Side API of the PivotGridV2
- Server-Side API of the PivotGridV2 HtmlHelper {% if site.core %}
- Server-Side API of the PivotGridV2 TagHelper {% endif %}