Configure the Collapse And Expand View Events And Methods

Use the Collapse and Expand events and methods to improve performance, or with actions such as Transfer Data. The Load and Initialize methods can be used when you expand the view and don't have to be executed when the form is initialized. This minimizes the execution time when a form is initialized. The image below shows the rules automatically created on a form. We want to collapse the Region List view, and only execute the initialize and list refresh methods when the view is expanded. To do this, we delete the indicated rule actions from the When the Form is Initializing event.

We then add a rule action to collapse the Region List view when the form initialize and finish the rule.

Next we create a rule for the Region List view to initialize and refresh when the view expands, in other words when you click to expand the view at runtime. This ensures that performance is minimized when the form initializes and only when the view is expanded, the rest of the rule actions are executed.