i
This is not the latest version of this document; to access the latest version, click here.
Unofficial Content
  • This documentation is valid for:

This document describes the 'Selection' node which is included in each Workwith instance file.

The purpose of the 'Selection' node is to define the peculiarities of the Workwith Web Panel that will be generated for the instance in question.

Its properties are:

  • Caption: Defines the Form caption.
  • Description
  • Page: Allows to define the number of rows to be displayed. The value can be a fixed number (ex. 10 rows), an enum value (like Page.Rows), unlimited (<unlimited>), or default (<default>). In the last case, the value is taken from the Config file (which is Page.Rows, so to change the number of rows, you only need to change de enum value itself).

Subnodes

Modes

This node allows defining which modes will be offered to invoke the TRN.

It contains the following properties to configure which modes will be offered (with their corresponding default values):
  • Insert: True
  • Update: True
  • Delete: True
  • Display: False
  • Export: True
In the generated Workwith, two columns in the grid will offer the update and delete options. And for the export to excel and insert (with the " " bitmap) options, an independent button will be added (outside the grid).

For each mode, a condition can be specified. The following properties are given for this purpose:
  • Insert Condition
  • Update Condition
  • Delete Condition
  • Display Condition
If a condition is defined, the associated action will be enabled only if its evaluation is true. For the update, delete, and display actions (which apply to a particular record) the condition can refer to values of the row (for example, "Customerid = 10"). The condition can be anything that can be written inside an "if" statement in GeneXus, and often contains references to the context (current user, user level, etc) object parameters, and the like.
 

Attributes

Defines the attributes to be shown in the grid.

Properties:
  • Description. Text that will be shown as a label (in tabular tabs) or as the column title (in grid tabs). The default value is taken from the attribute's column title but can be modified here.
  • Autolink. If the attribute is a and this property is set to true, a link to the corresponding View web panel will be placed wherever the attribute it is.

Orders

The grid can have many orders to sort the rows. By right clicking on the Orders node, it is possible to add a new order, its name, and composition. Each Order can be composed of many attributes, and each attribute can be ascending or descending.

Filters

Defines the conditions to filter the rows.

Its subnodes are:
  • Attributes. Set of attributes/variables presented in the form and used in the conditions.
  • Conditions. When an attribute/variable is added to the previous property, it is possible to add its condition to this property.
  • Control Info. You can configure Control Info to Filter Attributes, this is possible with the right button / Add ControlInfo? option. You must configure all necessary properties for the selected Control Info.

Actions

Besides the predefined nodes we have been describing, we can add a node called 'Actions' to the 'Selection' node. This node allows defining actions so that the user can execute them when working with the Workwith Web Panel.

You can create this 'Actions' node by right clicking on the 'Selection' node and selecting the Add Actions option.

And to create one new action under the 'Actions' node, you can right click and select the Add Action option.

An action has the following properties to be set:
  • Caption
  • GXObject: invoked object when performing the action
  • Condition: determines whether the action will be enabled
  • Ingrid: Defines if you want the action to be added as a column in the grid (so that the action can be applied to a particular row) or as an independent action (out of the grid). In this last case, a button will be added with a user event associated with it, named with the Caption value.
  • Multirowselection: Setting this property to True, a column with a checkbox will be added to the grid, and the action will be taken out of the grid. Thus, in runtime, the action may be applied to multiple rows. The default value for this property is False.

When MultiRowSelection=True, a Structured Data Type collection with all the attributes of the selected rows is added in the event code associated to the button. Then, the GeneXus object that was specified in the GXObject attribute is called, and the SDT is transferred as first parameter as well as the additional parameters (note that by right clicking on the 'action' node, the _Add parameters_ option is offered to define additional parameters to be sent to the invoked object).

 

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