Exporting Grouped Data
The KendoReact Grid CSV export feature supports exporting grouped data with group headers and aggregate footers. When the Grid data is grouped, the export automatically includes group information in a flattened format suitable for CSV.
This is a Free React CSV Export feature of the GridThe KendoReact CSV Export feature of the Grid is free to use, including in production—no sign-up or license required. Check out all 120+ free and premium UI components in the enterprise-grade KendoReact library.Basic Grouped Data Export
The following example demonstrates exporting grouped data to CSV. The Grid uses autoProcessData for built-in data processing and groups products by category and discontinued status. When exported, the CSV includes group headers and aggregate values (sum of unit prices per group):
Export Format
The exported CSV represents the grouped hierarchy in a flat format:
| ProductID | ProductName | UnitPrice | ... |
|---|---|---|---|
| Group: Category.CategoryName > Discontinued | Beverages: Beverages | Discontinued: false | ||
| 1 | Chai | 18.00 | ... |
| 2 | Chang | 19.00 | ... |
| sum: 37.00 |
Nested Groups
The export handles multiple levels of grouping. In the example above, products are first grouped by Category.CategoryName and then by Discontinued status, creating a nested group structure in the exported CSV.
Aggregates
To include aggregates in the export, define them in your GroupDescriptor:
const aggregates: AggregateDescriptor[] = [{ field: 'UnitPrice', aggregate: 'sum' }];
const group: GroupDescriptor[] = [
{
field: 'Category.CategoryName',
aggregates
}
];
The supported aggregate functions are:
sum- Sum of valuesaverage- Average of valuescount- Count of itemsmin- Minimum valuemax- Maximum value