OnGridExecute Event

Description

This event fires every time the Grid is executed. This includes every Ajax callback.

Discussion

This event fires every time the Grid is run, including every Ajax callback. You can use this event to override certain Grid settings. The Grid settings are in e.tmpl.

The following variables are available to you in the event:

Variable
Description
e.tmpl

The grid component definition

e.rtc

Run-time calculations (allows you to pass data to other event handlers)

e.ajaxCallback

.f. if this is the initial load of the Grid. .t. if this is an Ajax callback.

 Example

'Set the Grid rows per page to 20
e.tmpl.rows = 20

'Set the style
e.tmpl.style_name = "GlassOlive"

 Setting State Variables

You can also set state variables in this event. The value of any state variables will be available in all subsequent ajax callbacks (in the e.__si2 object).

To set a state variable:

e._state.myvar1 = "value1"
e._state.myvar2 = "value2"

See Also