OnGroupFooterRender Event


This event fires when a Group Footer is rendered. It allows you to inject HTML either before, or after the Group Footer HTML, or modify the Group Footer HTML computed by Alpha Anywhere. Group Footer are displayed if you turn on the 'Has group breaks' property.


Allows you to inject HTML above or below the Group Footer HTML. It is fired before a Group Footer is rendered.

The following variables are available to you in the event:


The grid component definition


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


The Group Footer HTML computed by Alpha Anywhere


The current value of the Group Break Expression


A pointer to summary values computed for the current group


A pointer to the table (for .dbf) or resultset (for SQL) for the current row in the Grid. IMPORTANT: Your code must NOT advance the pointer (by doing a e.tbl.fetch_next() or e.tbl.nextRow()). You can read values from the current grid row as follows:"feldname").

For SQL Grids the data in e.groupSummary does not use real fieldnames. The data is mapped to psuedo fields like 'GROUP_SUMMARY_FIELD_1', 'GROUP_SUMMARY_FIELD_2', etc. The map from real field name to psuedo field name can be found in the e.rtc.summaryValueFieldMap property.

Injecting HTML Above/Below the Group Footer

If you inject HTML above or below the Group Footer, you must wrap the injected HTML in <tr>..</tr> tags. The example below shows how a row is injected above the Group Footer:

e.groupFooterHTML = "<tr><td colspan=\"100\">New data above the footer</td></tr>" + e.groupFooterHTML

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"