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