onDetailViewRender Event

Description

This event fires when the Detail View section is rendered. It allows you to inject HTML into the Detail view, or replace the Detail View body with HTML that you compute.

Discussion

This event fires when the Detail View is rendered. It allows you to inject HTML into the Detail View. Your injected HTML Prefix appears below the Detail View toolbar (if the toolbar is set to appear above the Detail View) and the injected HTML Suffix appears above the Detail View toolbar (if the toolbar is set to appear below the Detail View)

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.html

HTML for the Detail View part (not including the Detail View toolbar). Your event can optionally modify this property.

Your event must set these properties:

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

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"