Official Content

You can define Nested Grids in a Web Panel Web Layout.

To achieve this, inside a Free Style Grid control you can add another Free Style Grid control or a Grid control.

A Grid control (standard grid) cannot have other grids nested within it.

For example, consider the following Transaction objects:

Category
{
  CategoryId*
  CategoryName
}

Company
{
  CompanyId*
  CompanyName
  CategoryId
  CategoryName
}

To display in a Web Panel object each category and its associated companies, as shown:

Hotels
Hilton
Hyatt
Marriot
Airlines
United
Air France
...

You must first insert a Free Style Grid containing the CategoryName attribute. Then, within the Free Style Grid, insert another Grid (standard or Free Style) containing the CompanyName attribute.

Remember the Grid control (standard grid) cannot have other grids nested within it. So, if you need to have several levels of nested grids, only the last grid may be a standard grid.

Finding Base Tables

Nested grids follow the same relationship rules as nested For Each commands. Therefore, GeneXus finds each grid's base table (they aren't completely independent: the main grid's base table will influence the finding of the nested grid's base table).

Next, based on these findings it defines the navigations it will make for each grid. The grids' logic will depend on the relationships found between said tables.

If there isn't a base table, the data should be loaded with the Load command.

Triggering Events

Each grid maintains its own Load event and Refresh event. Every time the Load command is executed in a grid with nested grids, a call is made to each child's Refresh and Load event.

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant