Unofficial Content

Data Selectors can be used in a Web Panel Grid control through the Data Selector property or the USING clause in the Load event.

Web Panels with Base Table

If the grid has attributes, when the Data Selector property of the grid is associated with a DS, the grid is loaded with the records corresponding to the combined data of the DS definitions and the grid information. This means that at specification time, the information of the DS is expanded and merged with the grid information and the final result will be the navigated table.

Grid Example DS

DS Example In Grid

Note that in this example, no order was established in the grid. However, the records are not ordered by primary key, as they would be if they had been recovered directly through the Web Panel's implicit For Each command. Instead, data is ordered by airline name, according to the order definition given in the DS.

DS y Web Panel con TBDataSelector_Grid

Web Panels without Base Table

If the grid has variables only (i.e.: &AirlineId and &AirlineName), instead of associating the Data Selector property, it is possible to load the grid with a DS through the USING clause in the For Each command written in the Load event, as follows:
Event Load
   For each USING DSExampleInGrid() 
      &AirlineId = AirlineId    
      &AirlineName = AirlineName    
      Load 
   Endfor
EndEvent

Note that the Web Panel navigation also matches the order definition in the DS:

DS y Web Panel sin TBDataSelector_Grid

See also

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

Work With List Node
Entry Panels as Filters for a List in Smart Devices

Videos

Start Video Data Selector object

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant