Select method

Official Content
This documentation is valid for:

Selects an item in the Grid by giving its index value (starting at 1).
If the index is out of the Grid's scope (i.e. larger value than the number of rows loaded), it will not have any effect. If the selected index's corresponding item is not visible, the content will scroll automatically so that the item is shown on screen.

Syntax

<Grid>.Select(<index>)

where <Grid> is the grid control name and <index> is a Numeric expression (attribute, variable or constant value).

Notes for Smart Devices

  • Will not execute the default action associated with the Grid.
  • Will properly switch the default selected item layout.
  • In iOS, when the method is triggered, it will apply the Highlight Background Color property from the GridRow theme class.
    In Android, there is no user's feedback when selection is done by code.
    In order to achieve the same behavior on both platforms, ensure that Highlight Background Color property is empty.
  • When Grid control allows Multiple Selection, this method has different behaviors depending on Show Selector property value. 
    • Always
      Will be accumulative.
    • On Action
      Won't be accumulative and the UI effect depends on Selection Type property value.

Scope

Controls Grid control
Platforms Smart Devices (iOS,Android), Web(.Net, Java)

Availability

This method is available as of  GeneXus 15 Upgrade 6 for iOS, GeneXus 15 Upgrade 7 for Android and Genexus 15 Upgrade 10 for Web.

See also