Grid Item - Selected Property

True if this item is currently selected

Member of Grid Item (PRIM_GDIT)

Data Type - Boolean


Selected will return True if the item is selected.
All list controls allow one or more items to be selected using the keyboard, mouse or programtically.
Actions can then be performed on the set of selected items.


In this example, a list is being processed and a total salary prepared for the selected items.
SELECTLIST is needed here to ensure the field values are returned as the items are processed.
SelectList Named(#List)
Continue (*Not #List.Currentitem.Selected)
   #Total += #Salary
In this example, selection state is being reversed.
FOR can be used here as no access to the field values is required.
For Each(#Item) In(#List.Items)
   #Item.Selected := *not #Item.Selected

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020