Grid Control 2.0

Specify Event for Entire Row

Technologies / User Interface Add-Ins / Parts for Reports / Per-row Events

If there is only one possible action for the grid drill-down, you can make the whole row act as a single clickable link. Specify a single event listener for row click, instead of assigning identical event listeners to each field.

grid_row_events.png

You can specify the event listener as a command:

<panel type="grid" ...>
...
<event type="onClickItem">
<command type="openDialog" viewName="ab-edit-request.axvw"/>
</event>
...
</panel>

If you do so, you need not add controlType="link" and commands to individual fields.

Alternately, you can auto-wire a controller method as an event listener. In this case, you do not need to add the event element to the view:

myGridPanel_onClickItem: function(row) { // the row parameter is the Ab.grid.Row object for the selected row var restriction = row.getRecord().toRestriction(); View.openDialog('ab-edit-request.axvw', restriction); }

Example view: http://localhost:8080/archibus/schema/ab-products/solutions/parts/grid/ab-ex-report-grid-row-action.axvw