Server-Side Row Model - Pivoting

Summary

  • Pivoting is available in AdapTable when using the Server-Side Row Model
  • The data needs to be pivoted on the server and passed to the client to display
  • Pivot result columns are created dynamically from the server response

AdapTable fully supports Pivoting when using the Server Side Row Model.

Nothing additional needs to be added, on the AdapTable side, to that which is provided in AG Grid's Server-Side architecture.

Note

After each getRows response you typically build AG Grid pivot result columns from the fields the server returns (see pivotResultColumns.ts in the demo).

SSRM - Pivoting
Fork
  • Uses the public athletes mock server (data.adaptable.dev) to pivot on the server and return rows + pivotFields
  • Switch Layouts in the Dashboard toolbar to compare patterns:
    • Year Pivot — group by Country, pivot on Year, sum Gold (dynamic year columns)
    • Multi-Value Pivot — same pivot with Gold / Silver / Bronze under each year group
    • Multi-Group Pivot — group by Country then Sport, pivot on Year (expand a country to drill down)
    • Agg-Only Pivot — Pivot Sum style: group by Country, sum medals, no PivotColumns (empty array)
  • Pivot result columns are rebuilt whenever the server returns a new pivotFields set
Loading demo…