Table of contents



Official Content

Defines the behavior of the Grid's rows when they are selected.

Values

Keep selection while executing The selection ends when the Default Action ends.
Keep until new selection The selection ends when another selection is made.
No selection The tapped row will not be selected.
Platform Default Default value. Uses the platform default behavior.

Scope

Generators: Android, Apple, Angular
Controls: Grid, Tabular Grid

Description

This property sets the behavior of the Grid's rows when they are selected.

The default value is Platform Default.

Below are described the possible values the property can take.

Value Description
Platform Default Default value. Uses the platform's default behavior.

For Apple:

For Android:

No Selection The tapped row will not be selected.

• The grid's Highlighted Background color is shown while the user interacts with the control.
• The Default Selected Item Layout property will not be shown regardless if it is defined or not.
• The SelectionChanged Event will not be triggered.
 
Note: Until GeneXus 15 Upgrade 5, the No Selection value was known as Autodeselect.
Keep Selection While Executing   The selection ends when the Default Action ends.

• If the Default Selected Item Layout property is configured, this value is shown; otherwise, the grid's Highlighted Background color is shown.
• This value only makes sense when the Default Action property or SelectionChanged Event of the Grid are defined.
• If an item is selected, and the user selects it again, the item is still going to be selected and the Default Action property of the Grid is executed again.
 
Keep Until New Selection The selection ends when another selection is done.

• If the Default Selected Item Layout property is configured this is shown; otherwise, the Grid's Highlighted Background color is shown.
• This value only makes sense when the Default Selected Item Layout property is set.
• If an item is selected, and the user selects it again, the item is deselected and the Default Action property is executed again.
 

 

Note: For Grids with Multiple Selection for Native Mobile Applications the behavior will correspond to the Keep Until New Selection value.

 

Runtime/Design time

This property applies only at design time.

Samples

Take as an example the EventDay sample KB and see how different values of the Selection Type property change the behavior of a row when it is selected. For instance, in the Sessions Grid at the List level of the Work With Session:

When using the No Selection value the Highlighted Background color is shown only when the user taps on the row; after that, the row is deselected automatically:

 Selection Type No selection screenshot v 18

When using the Keep Selection While Executing value, the Highlighted Background color is shown until the Default Action ends:

Selection Type KeepWhile screenshot v18

See Also

Grids with Multiple Selection for Native Mobile Applications
Default Selected Item Layout property
Multiple Layouts in Panels

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