Selected item of grid
The Behaviour type Selected item of grid checks a specific element to be evaluated (Data grid or other List elements) for the presence of a selection and returns the first object in this selection, if any.
The element to be evaluated is determined as follows, depending on the existence of an element link for the behaviour:
If no element is linked, then the executing element of the behaviour is examined.
If an element is linked, then the linked element is examined.
Actions on ‘true’ are executed if the following conditions are met:
The element to be evaluated belongs to the group of List elements.
There is a selection for the element to be evaluated, that is, at least one element is selected.
For Actions on ‘true’, the data of one object in the selection is then available:
If a singular selection (with just one object) exists, its data is used.
If multiple elements are selected, the data of the object that was first added to the selection is used.
In all other cases, Actions on ‘false’ are performed, when two different cases of data are to be differentiated:
If the element evaluated is a list element for which no selection exists, the behaviour data is empty ($null).
If the element evaluated is not a list element, any existing behaviour data is passed on unchanged.
Specific notes for different types of List elements
Relevant for Notes |
Tree element |
|||
The behaviour Selected item of grid is only useful for list elements that support selection. |
|
|
|
|
To inspect a multiple selection, it often more useful to choose the behaviour Selected items of grid unless determining whether at least one element is selected is the key objective. |
|
|
|
|
For list elements for which selection is the value of the element, the behaviour may report ‘items’ as selected that are not (or no longer) contained in the list. |
|
|
|
|