Data Selectors can be used in a Web Panel Grid control through the Data Selector property or the USING clause in the Load event.
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.
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.
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:
For each USING DSExampleInGrid()
&AirlineId = AirlineId
&AirlineName = AirlineName
Note that the Web Panel navigation also matches the order definition in the DS:
Data Selectors in Grids
Data Selectors in Aggregations
Data Selectors in Data Providers
Data Selectors in For Each command
Work With for Smart Devices List Node
Entry Panels as Filters for a List in Smart Devices
Data Selector object