Documentation
Row Grouping
Row grouping allows you to organize your data into expandable hierarchical structures, making it easier to navigate large datasets with natural parent-child relationships.
Basic Setup
To enable row grouping, add the expandable: true property to your column header, structure your data with nested arrays, and specify the grouping hierarchy.
💡 Use Cases
- Organize teams by department and show individual members
- Display projects with their milestones and tasks
- Show product categories with subcategories and items
- Group transactions by account, invoice, and line items
Row Grouping Configuration
Dynamic Row Loading
For large datasets, use the onRowGroupExpand callback to load nested data on-demand. This example demonstrates a three-level hierarchy (Regions → Stores → Products) where child rows are fetched from an API only when their parent is expanded. The callback provides powerful helper functions like setLoading, setError, and setEmpty for state management, plus rowIndexPath for easy nested data updates.
💡 Benefits
- Faster initial load - only top-level rows are fetched
- Reduced memory usage - child data loaded as needed
- Better performance with large hierarchical datasets
- Seamless integration with server-side APIs
- Built-in state management with setLoading, setError, and setEmpty helpers
- Simple nested data updates using rowIndexPath array