From wiki.ginstr.com
Jump to: navigation, search

gn:act_setSelectedItem

Description
Action used to select dropdown item GnDropDown or GnAutoCompleteTextView
Action returns
void

Action signatures

Select list item based on row index

[gn:act_setSelectedItem]|[target,index,disableItemSelectEvent]
Parameter Description
target target where the item will be selected
index represents a row index of row which will be selected
disableItemSelectEvent (M104) optional attribute used to disable execution of gn:act_setSelectedItem action after gn:act_setItemSelect event is fired

Default value: false

Example

@+id/dropDown - GnDropDown
3 - row index
[gn:act_setSelectedItem]|[@+id/dropDown,3]

Select list item based on value

[gn:act_setSelectedItem]|[target,source,disableItemSelectEvent]
Parameter Description
target target where the item will be selected
source source from where the value will be used to select matching list item
disableItemSelectEvent (M104) optional attribute used to disable execution of gn:act_setSelectedItem action after gn:act_setItemSelect event is fired

Default value: false

Example

@+id/dropDown - GnDropDown
@+id/txtEmployee - GnEditText
@variable/statusTrue - status
[gn:act_setSelectedItem]|[@+id/dropDown,@+id/txtEmployee,@variable/statusTrue]