DataAreaCollapsed property: Rowset class
Description
This property specifies whether the view of a data area is collapsed or expanded.
Note:
You must set the Collapsible Data Area field on the properties for the level-based control for this property to have any effect.
This property changes to reflect the current state of the data area, according to whether the user has collapsed or expanded it. Changing the value collapses or expands the data area, but it does not prevent the user from collapsing (or expanding) it themselves.
Note:
Because the user can change the value of this property, whatever value is set in PeopleCode isn’t guaranteed to be still set the next time it is checked, because the user may have collapsed or expanded the data area in the meantime.
This property overwrites the value of the Default Initial View to Expanded field set in Application Designer. For example, if the Collapsible Data Area check box is selected and the Default Initial View to Expanded State check box is left unselected in Application Designer, then the control will be displayed as collapsed at runtime. If the DataAreaCollapsed property is set to false for this control before the page is displayed, then that will override the Application Designer setting and the control will be displayed as expanded.
This property takes a Boolean value: True, initially display the data area collapsed, False, initially display the data area expanded.
This property is read/write.
Note:
To collapse just a group box, use the DataAreaCollapsed field method.
Example
The following example checks the number of rows in the level one rowset. If the number of rows returned is larger than 100, the data area is initially displayed collapsed.
If &Level1.RowCount > 100 Then
&Level1.DataAreaCollapsed = True;
Else
&Level1.DataAreaCollapsed = False;
End-If;
Related Topics