Vertical grid? (NG-grid orientation/pivot)

Hello everyone,

is there a way to have the grid in a vertical orientation instead of horizontal?
I have a case where there are a lot columns but only 2 or 3 rows and with the long column names the whole grid is just too wide.
Thanks.

Cheers,
Alexander

Hi Alexander,

not sure if that’s possible with the grid, but easy way out is just to convert your data.

So in this case:

  1. create an in memory table with a column to hold the column name from the original table and x columns (depending on the number of rows) to hold the values.
  2. assign the in memory table to the grid element
  3. now loop through the data of the original table and insert column name and it’s value in the appropriate columns of the in memory table.

you can always have a look at ag-grid.com which is the 3rd party component where data-grid is based on.
please bear in mind that not everything that is described has been exposed in the data-grid component.

Hope this helps