OnSummarySectionRender Event

Description

This event allows you to inject HTML into the Grid part as the Grid is being rendered on the server.

Discussion

Allows you to inject custom HTML into the Grid when the Summary Section is rendered. This event fires if a Grid has summary fields. It is fired when the Summary Section row in rendered.

The event fires even if the 'Suppress Summary Section' property is checked.

The following variables are available to you in the event:

Variable
Description
e.tmpl

The grid component definition

e.rtc

You can put any data in this variable that you want to pass to other events. e.g. e.rtc.mydata = 'value1'

e.gridColumnCount

The total number of columns in the Grid <table>, including any system columns.

e.gridSystemColumnCount

The number of system columns in the Grid <table>. System columns are used for objects such as system buttons, row expander icon, etc.

e.summarySectionHTML

The computed summary section HTML. Will be blank if the 'Suppress Summary Section' property is checked.

e.summaryValues

Summary values for the fields for which summary calculations were defined.

Example summary values in e (assuming you requested summary calculations for the QUANTITY field):

e.summaryValues.QUANTITY.Count
e.summaryValues.QUANTITY.Min
e.summaryValues.QUANTITY.Max
e.summaryValues.QUANTITY.First
e.summaryValues.QUANTITY.Last
e.summaryValues.QUANTITY.Total
e.summaryValues.QUANTITY.Average
e.summaryValues.QUANTITY.Var
e.summaryValues.QUANTITY.StdDev

Your event must set these properties:

Property
Description
e.htmlPrefix

The HTML markup that you want to add before the Summary Section is rendered. Must be wrapped in <td>...</td> tags.

e.htmlSuffix

The HTML markup that you want to add after the Summary Section is rendered. Must be wrapped in <td>...</td> tags.

e.javascript

(optional) Any Javascript that you want to execute

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"