Official Content

The New Row style in grids is configured by using the New Row Class property available in the Theme.

New Row Class is a class property in the Theme available for Grids and Free Style Grids, whose purpose is to configure the class that will determine the settings of the grids "new row" link. See the image below where the "new row" link is highlighted:

i2016_03_17_19_58_591_png

How to use the New Row Class property 

First, check the class associated with the grid (in the example it is the Grid class), and edit the New Row Class  property for the Grid class in the Theme.

i2016_03_17_19_49_074_png

i2016_03_17_19_40_112_png

By default, the value of New Row Class is GridNewRow, which is a descendant of the Texblock class.

There, you can change the settings of the GridNewRow class as desired. For example, changing the Font Size would be as follows:

i2016_03_17_19_42_403

Note:

If you want to change the text or position of the "new row" functionality, you need to use a control to execute that action:

  • Drag a control to the form (it can be a button or text block in which the user can click on), and assign it the caption and the Theme class more convenient to your design
  • Use the AddLines method the make GeneXus know that the default "New Row" link has to be eliminated and it will be replaced by your link.

See HowTo: Work with rows in a Transaction Grid for more information about this topic.

Samples

Here, a button to the form has been added, whose On Click Event is "AddLines".

i2016_03_18_13_49_376_png

The control name of the transaction's grid is GridCustomer_Address so the AddLines event is as follows:

Event 'AddLines'
    GridCustomer_Address.AddLines(1)
Endevent

At runtime:

i2016_03_18_13_42_535_png

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