OnExpandRow Event

Description

This event fires when the user clicks the icon to expand a row in the Grid.

Discussion

This event ONLY fires if you have set the 'Row expander type' to 'CustomEvent'.

The following variables are available to you in the event:

Variable
Description
e.tmpl

The grid component definition

e.rowNumber

The row number of the row that was expanded (numeric value)

e.primaryKeyValuesArray

An array of the primary key values for the row that was expanded. All values in this array are character values, even if the corresponding primary key column is of a different type.

This event must set the e.html and e.javascript properties. The contents of the expanded row will be set to e.html. In addition, if e.javascript is not null, the javascript contained in this property will be executed.

Property
Description
e.htmlPrefix

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

e.htmlSuffix

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

e.javascript

(optional) Any Javascript that you want to execute

Example

e.html = "this text will be inserted in the row when it is expanded"
e.javascript = "alert('Row was expanded');"

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"