Fired when the user clicks on a row

Parameters

ParameterDescription
RowIndex to the row that was clicked
ButtonThe button used to click the row
ColumnIndex to the column that was clicked
PointLocation of the mouse when clicked

Remarks

The OnItemClick event is fired when the user clicks on a report table row. The event provides four parameters:

Row

The Row parameter contains the index to the row that was clicked. Use this parameter in conjuction with the RowData property to decide how to react to the click.

Button

The Button parameter will have one of three values indicating what was used to click the row:

ValueDescription
LeftThe left mouse button clicked the row
RightThe right mouse button clicked the row
EnterThe enter key was used (occurs only when the EnterKeyClickAmt property is set to 1)

Column

The Column parameter contains the index to the column that was clicked. After getting the clicked row's contents using RowData, use this index to examine the value of the item actually clicked. This value is 0 when the Button parameter is "Enter".

Although the user can rearrange columns, this parameter will always be the same as when the column was first created. For example, if the user moves column 1 to column 5, this parameter will still be 1 when the user clicks on the column in its new position.

Point

The Point parameter provides the mouse coordinates, relative to the top-left corner of the Report Table. The format is "X,Y" where X is the x coordinate and Y is the y coordinate. For example, a value could be "10,100". This parameter is useful for showing popups or context menus. This value is "0,0" when the Button parameter is "Enter".

Example

Transfer Param1 to Row 
Transfer Param2 to Button 
Transfer Param3 to Column 
Transfer Param4 to Point 

// get the clicked item's data 
RowData = Get_Property(@Window:".OLE_REPORTTABLE", "OLE.RowData[":Row:"]") 
ItemData = RowData<Column>

See Also

OnItemDblClickOnHeaderRightClickRowData

  • No labels