Default Selected Item Layout property

Official Content
This documentation is valid for:
Indicates which layout of an SD grid’s row must be shown when it is tapped on, to show more or less information, and also to enable new actions only available when the row is selected.

Samples

Consider the EventDay application, where there is a WorkWithDevicesSpeakers object with a grid in which all the event’s speakers are loaded.

Suppose that after selecting a speaker from the grid –by tapping on it–, you want instead of calling the Detail, showing a brief biography of the speaker, and an arrow-shaped image to access further information on the speaker if desired.
 

Normal   "Cimas Alejandro" selected
Image_GridSpeakers   Image_GridSpeakers2


Therefore, you need two layouts for each item or line of the grid: One that is used when the line is not selected, and another one to use when it is selected. 

To create a new layout on the SD Grid of the Speakers List level, you have to:

  • Click on the upper right corner of the SD Grid.
  • In the menu that is displayed click on “Add New Item Layout”.

Image_AddNewItemLayoutSpeaker

  • Enter the name desired for the new Layout (i.e., "SelectedItem"). Note: We will also rename the default layout as “Item”.
     
  • Organize the Layout as wanted (Add/Move/Remove elements). In this example, we show a brief biography of the speaker, and an arrow-shaped image to access further information on the speaker if desired.

Image_LayoutSpeaker

Image_GridSpeakerProperties

  • Run (F5) and watch the result.

Additionally, to continue having access to the Detail level, create the following event on the arrow-shaped image of the SelectedItem layout:

Event Image1.Tap
    WorkWithDevicesSpeaker.Speaker.Detail(SpeakerId)
EndEvent

Consideration: For the Default Selected Item Layout property to work, the Grid’s Default Layout must be different from the layout configured in that property.

Availability

This property is available since GeneXus X Evolution 3.

Scope

Platforms: Smart Devices(Android, IOS)
Controls: Grid for Smart Devices

See Also

EventDay KB
Multiple Layouts per Row
Work With for Smart Devices object
Work With for Smart Devices configuration
Work With for Smart Devices Detail Node
Work With for Smart Devices List Node

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.