when expanding a group, inside the expand event (function) we do have access to the groupIndex. but groupIndex is not available inside the groupHeader(Footer)Template itself. we need that groupIndex, so we can get the parent items (groups) to the group that is expanded.
Hi Balazs,
The developer can use the index field provide by the template context to capture the current group index:
Regards,
Martin
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
From SUPPORT: We already added the desired functionality. The groupHeaderTemplateDirective will export the groupIndex as well. Indeed, it will take some time for the change to take effect as some internal checks need to be passed before we can release the new version. You can follow the changelog article of the grid for latest versions updates: https://www.telerik.com/kendo-angular-ui-develop/components/grid/changelog/ I already had a way to find the item in the hierarchy via the available dataItem in the header: private getNodePathArrayToGroupViaGroupDataItem(gridItems: any[], groupDataItem: any, parentPath: Array<{ field: string, value: any }> = []): Array<{ field: string, value: any }> { let currentNodeItems = gridItems; for (let nodeItem of currentNodeItems) { if (this.isAggregate(nodeItem)) { let thisPath = parentPath.concat({field: nodeItem.field, value: nodeItem.value}); let itemFound = nodeItem === groupDataItem; if (itemFound) return thisPath; let innerResult = this.getNodePathArrayToGroupViaGroupDataItem(nodeItem.items, groupDataItem, thisPath); if (innerResult) return innerResult; } } return null; }