Grid control

Official Content
This documentation is valid for:

Displays data associated with many records; depending on the GeneXus object in which it is located, the Grid control also allows you to add, change, and/or delete data.

It can be used in Transaction objects, Web Panel objects, Panel objects (and also in Work With pattern and Work With objects and Work Panel objects).

It allows you to include both attributes and variables.

When used in a Transaction (grid with Base Table) it makes it possible to insert, update, and/or delete records in the corresponding associated table.

When used in a Web Panel (grid with/without Base Table, depending on whether it contains attributes and/or variables), it will display the data stored in tables; the variables can also accept values.

To add a grid to the selected location, drag the Grid icon (Grid control icon) from the Toolbox to the Form/Layout. This will open the Selector window to select which attributes/variables you want to include inside it:

Grid control Create New Grid

You can select multiple lines by clicking on them while holding down the Shift or Ctrl keys. When the selection is finished, the selected attributes and/or variables will be inserted in the grid.

When used in a Web Panel object, the Grid will contain one column for each attribute/variable:

Grid controlwebPanelAttractionsByCountry

When used in a Panel object, there is more flexibility regarding the location of the attributes/variables in the Grid (they can be on one side, below, above, or between them).

The order of the attributes/variables can be switched. To do so, select the attribute/variable to move, and an arrow will be displayed that indicates the possible new location. Then, drop it at the desired location.

Grid control move column Drag and  Grid control move column Drop

You can add more attributes/variables by right-clicking one of the attributes and selecting in the contextual menu: Insert Attribute/Variable

Grid control Contextual Menu

You can also drag & drop an attribute/variable from the Toolbox in the grid.

If you select the entire grid, the copy/cut/paste/etc. options will be available in the Edit option of the IDE; regular shortcuts (Ctrl+C, Ctrl+V, etc.) also work. 

Tip: To quickly select a grid, position the mouse cursor on the upper part of the control, as shown in the figure below.

Grid control Selection Handcursor


  • When used in Web Panel objects, a Grid cannot be nested in another, but you can use a Free Style Grid control which can contain a Grid. On the other hand, when used in Panel objects, a Grid control can contain another grid. 
  • By default, every attribute and variable inside a Grid of a Web Panel, Panel, or Work With object is displayed as read-only at runtime and cannot be changed. However, data can be accepted in the variables depending on the programming of the events existing in the object. Read about it here: Working with Grids in Web Panels.
  • Grids included in Panel objects offer the Control Type property which allows presenting the data with varied and interesting formats.

Runtime Features of Grids

  • Grids allow for paging, which can be automatically performed by GeneXus (read more about it here: Automatic paging in Grid control). 
  • The contents of columns can be ordered automatically, with no need for programming any additional code. The user can order the columns by clicking on their titles, as shown in the images below:

        imagegridorder gridorder2

Subcribe to this category's changes
Sub CategoriesAdd a new subcategory in this category
PagesAdd a new page in this category