Reputation: 2559
I am using a kendo for angular grid with grouping, this grid, is it possible to take action only on records within a specific group?
For example, in the group header I have a button and every row has a check box, when the user clicks the button I need to get only the rows with in that group.
Or select all rows in one group ?
Upvotes: 0
Views: 2828
Reputation: 2098
In the Grid Header Template we have access to the group
property that in turns contains all data items for the respective group under its items
property.
You can pass them to the custom button click handler and proceed accordingly:
<kendo-grid-column field="Category.CategoryName" title="Category">
<ng-template kendoGridGroupHeaderTemplate let-group let-field="field" let-value="value">
<strong>{{field}}</strong>: {{value}} <button class="k-button" (click)="onClick(group)">CLICK</button>
</ng-template>
</kendo-grid-column>
For example selecting all items from a group:
Upvotes: 1