Official Content

This article describes properties, methods, and ways to work with the rows of a Grid control in a Transaction object.

Properties

The Rows property is used to specify the number of empty lines that the Grid will contain by default in the Transaction.

Grids in Transactions - Row property v18

Methods

When a Transaction contains a Grid, it also contains the "+ NEW ROW" option. 

customer update new row

By pressing "+ NEW ROW," a new empty line will be added to the grid:

customer update new row added

In addition, the AddLines method is available to be applied to Grid controls. When it is used, the "+ NEW ROW" option will not appear.

For instance, suppose you have the following code for the Grid of a Customer Transaction:

Event 'Add Phone'  //Event associated with a button control added in the Layout 
    GridPhones.AddLines(1)
Endevent

In this case, the "+ NEW ROW" option won't be available for the grid, and each time the end user presses the "Add Phone" button a new line will be added to the Grid.

Deletion of lines

To delete a Grid line at runtime, the end user has to click on the row's minus symbol, and the row will be automatically deleted:

Gris in Trsnaction v18 - delete new row


Automatic mode inference

For each line, the mode (Insert, Update, Delete, Display) is automatically inferred. 


No Orders and conditions properties in Transaction Grids

Transaction Grids allow interaction with all the records of a Base Table. If conditions were enabled in Transaction Grids, it would not be possible to know if a record was hidden by a condition. 


Considerations

When using Grids in a Transaction, at least one editable Grid control is necessary.

See Also

Web Form Refresh

 

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