Vertical grid? (NG-grid orientation/pivot)

Questions and answers for designing and implementing forms in Servoy

Vertical grid? (NG-grid orientation/pivot)

Postby alexander.sternadel » Fri Nov 22, 2024 1:49 pm

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
alexander.sternadel
 
Posts: 14
Joined: Fri Nov 22, 2024 1:33 pm

Re: Vertical grid? (NG-grid orientation/pivot)

Postby mboegem » Fri Nov 22, 2024 4:20 pm

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
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1808
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Forms

Who is online

Users browsing this forum: No registered users and 3 guests

cron