Table of contents



Official Content

A Grid control, Free Style Grid control or Tabular Grid control can have a Data Selector object associated through its Data Selector property.

Consider the following Transaction object:

Airline
{
  AirlineId*
  AirlineName
}

Now, look at the structure of the DSExampleInGrid Data Selector object:

Data Selector in Grid Sample -1

Note below that the grid contained in the Web Panel object has the previous Data Selector assigned in its Data Selector property:

Data Selector in Grid Sample -2

The behavior is just like having a For Each with a USING clause. This means that the Data Selector doesn't have an associated navigation (it doesn't have a base table by itself). Therefore, at specification time, the Data Selector definition is combined with the Grid definition to determine the table that will be navigated, taking into account the attributes of both definitions:

  • If the Grid and the Data Selector have Conditions, both are considered
  • If the Grid and the Data Selector have Order clause(s), the resulting Order will be a combination of them. The Grid order has priority, so in the event that GeneXus discards a Data Selector Order, a warning spc0135 will be triggered at specification time

Thus, in the example shown, the grid will be loaded with all the Airline records that fulfill the grid conditions and the Data Selector conditions. The order with which the data will be retrieved will result from a combination of the specified orders in both definitions:

Grid Data Selector Result

Notes

  • If parameters need to be provided to the DS, list them in the Parameters property and separate them with commas.
  • Data Selector does not work in a Transaction's Grid.

See also

Data Selectors in Aggregations
Data Selectors in Data Providers
Data Selectors in For Each command

Videos

Start Video Data Selectors

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