ComponentOne List 8.0 for ActiveX
Using the RowBuffer Object

The RowBuffer is a programmable object used to exchange data between the list and your data source via the unbound list events. The RowBuffer object is passed into the unbound list event handlers as an argument. In fact, the RowBuffer object can only exist within the scope of the unbound events; you cannot create a new one in code as you would a Column or Split object. Here is a thumbnail sketch of the properties of the RowBuffer object:

RowCount property

RowCount is a long integer that specifies the maximum number of rows that can be processed in an unbound event (read, write, or add). If the value of this property exceeds the number of rows that can be processed, such as when an end-of-file condition is detected, then your event handling code should change this property to reflect the actual number of rows processed.

Example Title
Copy Code
RowBuffer.RowCount = Long

ColumnCount property

ColumnCount is an integer that specifies the number of columns that the unbound event should process. This property is read-only, and no attempt should be made to change it. The unbound event should process all columns requested.

Example Title
Copy Code
Integer = RowBuffer.ColumnCount

ColumnName property

ColumnName is a string array that specifies the name of the list column corresponding to a row buffer index. This property is read-only.

Example Title
Copy Code
String = RowBuffer.ColumnName(ColIndex)

' where ColIndex = 0 to ColumnCount - 1

Bookmark property

Bookmark is a variant array used to specify unique row bookmarks when the RowBuffer is used to fetch data during an unbound read event.

Example Title
Copy Code
RowBuffer.Bookmark(RowIndex) = Variant

' where RowIndex = 0 to RowCount - 1

Value property

Value is a variant array used to specify the data value associated with a RowBuffer row and column.

Example Title
Copy Code
RowBuffer.Value(RowIndex, ColIndex) = Variant

' where RowIndex = 0 to RowCount - 1

'   and ColIndex = 0 to ColumnCount - 1

ColumnIndex property

ColumnIndex is a variant array used to specify a list column index associated with a RowBuffer row and column. This property is read-only. You can use it in the UnboundReadDataEx event to identify which data columns are being requested.

Example Title
Copy Code
Col = RowBuffer.ColumnIndex(RowIndex, ColIndex)

' where RowIndex = 0 to RowCount - 1

'   and ColIndex = 0 to ColumnCount - 1

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback