Data Adapters
Data adapters transform raw data into formats that can be consumed by components like Grid, List, and Repeater. They handle operations such as sorting, grouping, and tree structure management.
Comparison
| Adapter | Purpose | Use case |
|---|---|---|
| ArrayAdapter | Handles flat lists with sorting and mapping | Simple repeated content |
| GroupAdapter | Groups records with headers, footers, and aggregates | Grouped lists, category views |
| TreeAdapter | Manages hierarchical data with expand/collapse | Tree grids, file browsers |
Grid and List use GroupAdapter by default, while Repeater uses ArrayAdapter.
How to Choose
Use ArrayAdapter for simple repeated content without grouping. It’s the default adapter for Repeater.
Use GroupAdapter for grids and lists. It’s the default for Grid and List components and supports grouping records by one or more fields, displaying group headers and footers, and calculating aggregates like counts or sums.
Use TreeAdapter for hierarchical data with parent-child relationships. It manages expansion state and supports lazy loading of child nodes.