Gregg L
Gregg L

Reputation: 380

Is it possible to have a "vertically-oriented" grid using ag-grid? (not pivot table)

The default layout for a grid in ag-grid is what I call "horizontal" (with respect to the rows):

Pictorially:
horizontal grid

I am needing grids to be "flipped" (aka, "vertical") in certain scenarios, such that:

Pictorially:
vertical grid

Is this possible with ag-grid?
I don't think their pivot table will work for this, but maybe I'm not thinking creatively enough :)
These grids are being used in an Angular app.

Upvotes: 6

Views: 4971

Answers (1)

Sapnesh Naik
Sapnesh Naik

Reputation: 11636

Currently, the only solution is for you to write the transpose logic on your raw data and Column definitions by yourself.

Here is an excellent example and a video explainer to go along with it:

Demo: https://stackblitz.com/github/LMFinney/ag-grid-partial

Blog: https://blog.oasisdigital.com/2018/transposing-rows-and-columns-in-ag-grid/

Video: https://www.youtube.com/watch?v=1BR9sH7zG7g

Upvotes: 1

Related Questions