[OutSystems Data Grid] Is it possible to create a two-dimensional grid?
Reactive icon
Forge component by Platform Maintenance
Application Type

My requirement is to have a grid that has the header, as expected, and the first column is comprised of several static rows. See the example below. The blue area contains the cells the user is expected to fill.

The values of the first columns are expected to be always the same, but the years will have to be generated depending on certain conditions.

What I've found until now:

If I put a breakpoint on DevTools at GridManager.InitializeGrid and modify the Data parameter, I can achieve something similar.

But, as you can probably imagine, things aren't as simple. This modification I made by hand in JS, however, I would need to do it on Server Side, reading the columns names of the table and reorganizing the output to be similar to above.

Additionally, I'm not sure how the saving of the data would be managed.

If anyone has any idea how I can solve this requirement, I would appreciate it.

Hi, Gustavo!

I try to solve problems like this using the platform's native features. Whenever possible, I try to avoid forge components.

 I needed to do something like this in two jobs:

  • At first, I had to create a matrix grid in an answer form. I chose to use blocks to solve my problem. I don't see it as a good alternative when there is no limit to the number of columns and rows.

  • In the second case, I created a metadata model to assemble the grid according to what was parameterized.

Hi, Ricardo!
Thank you for the suggestions!

When you say you created a metadata model to assemble the grid, are you talking about the one visible at the end of the second image I sent? Did it work correctly when detecting the changes and saving them to the DB? I suppose you had to use some JS to process the results from GetChangedLines.

Could you elaborate a bit more how you accomplished the second case? I appreciate it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.