sfLoadGroup

Loads a group control if it has not been already loaded. Applicable only if the group control is configured to be lazy loaded.

The rows of a lazy loaded is group control are not fetched until the user clicks on the group header. Groups are lazy loaded to improve the load time of a form by deferring the loading of data in less frequently used sections.

Syntax

sfLoadGroup(id, callback)

Parameters

Name

Type

Mandatory

Description

Name

Type

Mandatory

Description

id

string

yes

Control id of the group control.

callback

function

no

Code block to be executed after all rows in the group has been loaded.

See callback function.

This function has no effect if the group control is not lazy loaded or the user has already loaded the group control by manually clicking on the group header.

Usage examples

Let us consider a group control Products that has been configured to be lazy loaded. To load the rows on demand,

sfLoadGroup('control_products');

Example 2

Consider the example above. To perform some action after the rows of the group control have rendered on screen,

sfLoadGroup('control_products', function(){ // do something });;