Table View Events 

The SAP Table View control fires several events in order to inform the container on state changes, user interaction and drag and drop operations. The events may be enabled or disabled through the Table View object’s Events property.

The events are:

SAP Table View Events

Name

Parameters

Description

DblClick

void

A double-click occurred within the control’s client area.

KeyDown

short* KeyCode

short ShiftState

A key was pressed. The virtual key code is passed in KeyCode, the current state of the shift key in ShiftState. KeyCode may be modified within the event-handling routine.

KeyUp

short* KeyCode

short ShiftState

 

A key was released. The virtual key code is passed in KeyCode, the current state of the shift key in ShiftState. KeyCode may be modified within the event-handling routine.

TableCreate

void

A connected SAP Table object has created its table.

TableClear

 

A connected SAP Table object was cleared.

DataChange

Long Row1

Long Row2

Long Column1

Long Column2

Variant vaData

 

The data in the range Row1:Column1 to Row2:Column2 has changed. The new data is passed in vaData. If only one cell has changed, vaData contains data of a simple variant type, if an entire range has changed, vaData contains an array of variant.

RowInsert

Object Row

 

A new row object was inserted. The new Row object is passed as parameter Row.

ColumnInsert

Object Column

 

A new column object is being inserted. The new Column object is passed in as parameter Column.

RowRemove

Object Row

 

The row object Row is being removed. It is not possible to cancel the remove operation within the remove event handler.

ColumnRemove

Object Column

 

The column object Column is removed. It is not possible to cancel the remove operation within the remove event handler.

BeforeInput

Object Cell

 

The user starts an input action in the cell Cell. The corresponding Row and Column objects and indices are accessible through the Row and Column property of the Cell object.

AfterInput

Object Cell

Variant NewValue

 

The user ends an input action in the cell Cell. The according Row and Column objects and indices are accessible through the Row and Column property of the Cell object. The new value for the cell is passed to the event handler in NewValue.

DragSourceFill

Object DataObject

Short* Handled

 

A drag-and-drop operation is starting. DataObject is a SAP Data Object and may be filled with any format.

DropComplete

Long Effect

 

A drag-and-drop operation has been completed. Effect describes the type of drop done. It is up to the application to consider the Effect.

DropEnter

Object DataObject

Long KeyState

Long* Effect

Short* Handled

 

During a drag-and-drop operation, the mouse pointer was moved into the client area of the control.

(See also SAP Data Object)

Drop

Object DataObject

Long Row

Long Column

Long* Effect

Short* Handled

 

A drop has occurred on the control’s client area.

(See also SAP Data Object)

SelChange

Long RowLow

Long ColumnLow

Long RowHigh

Long ColumnHigh

 

The selection property has changed. The parameters RowLow, ColumnLow, RowHigh, ColumnHigh are the new selection. If only one cell is selected, the high values equal the low values.

Error

Short Number

String* Description

Long Scode

String Source

String HelpFile

Long HelpContext

Short* CancelDisp

 

This event is fired after an error has occurred. Description is a literal error description. Scode is the corresponding OLE error code or control specific error code. Source is the name of the control causing the error, HelpFile and HelpContext define where to find specific help on the error that occurred. CancelDisp must be set to TRUE if no error message box should appear. Setting CancelDisp to FALSE is very convenient during development. For release applications, this parameter should be set to TRUE in most cases.

If special errors should be treated in the error event handler, the Scode and the Number parameter are to be used as the describing element. The Description parameter is language-dependent and may vary with different versions of the control.