BBjDataBoundGrid
Description
In BBj 7.00 and higher, the BBjDataBoundGrid is a grid that can be bound to a BBjRecordSet. The selected row of the BBjDataBoundGrid is always the current record of its bound BBjRecordSet. Changes of the values in the BBjRecordSet are reflected in the BBjDataBoundGrid and edits that occur in the selected row of the BBjDataBoundGrid are reflected as changes in the current record of the BBjRecordSet. BBjDataBoundGrid extends the class BBjGrid.
Implemented Interfaces
CommonGrid, Focusable, MouseWheelEnabled, SimpleRecordSetBindable,TabTraversable
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjDataBoundGrid
A BBjDataBoundGrid object is created through the following BBjWindow method:
|
Return Value |
Method |
|
BBjDataBoundGrid |
addDataBoundGrid(int ID, number x, number y, number width, number height) |
|
BBjDataBoundGrid |
addDataBoundGrid(int ID, number x, number y, number width, number height, string flags) |
Creation Flags
| Flag | Description |
|---|---|
| $0001$ | Sets the grid control to be initially disabled. |
| $0002$ | Creates a managed grid control as a column heading. |
| $0008$ | Allows users to resize grid columns. |
| $0010$ |
Sets the grid to be initially invisible. The grid can be made visible with the following command:
|
| $0020$ |
Draws vertical lines between columns in Visual PRO/5 2.0x. In Visual PRO/5 2.10 and higher, use flag $8000$ to draw vertical lines. The default behavior in Visual PRO/5 2.10 and higher is for this flag to do nothing. However, if the 2.10 backward compatibility SETOPTS bit (byte 7, bit $08$) is set, this flag will cause vertical lines to be drawn. |
| $0040$ | Draws horizontal lines between rows. |
| $0080$ | Includes a horizontal scroll bar with the control. |
| $0100$ | Includes a vertical scroll bar with the control. |
| $0800$ |
Creates a three-dimensional recessed client edge around the control. Note that the client edge is displayed inside the control's bounding rectangle, slightly reducing the visible area of the grid. |
| $1000$ |
Creates a three-dimensional raised edge around the control. Note that the raised edge is displayed inside the control's bounding rectangle, slightly reducing the visible area of the grid. |
| $8000$ | Draws vertical lines between columns. |
Methods of BBjDataBoundGrid
|
Return Value |
Method |
|
void |
bindRecordSet(BBjRecordSet recordset) |
|
void |
bindRecordSet(BBjRecordSet recordset, BBjVector fieldnames) |
|
void |
Methods of BBjDataBoundGrid inherited from BBjGrid
Methods of BBjDataBoundGrid inherited from BBjControl
Methods of BBjDataBoundGrid implemented for CommonGrid
|
Return Value |
Method |
|
void |
endEdit() |
|
void |
endEdit(int suppress) |
|
int |
getColumnStyle(int column) |
|
int |
|
|
void |
setColumnStyle(int column, int style) |
|
void |
setDefaultGridStyle(int style) |
|
void |
startEdit(int row, int col) |
Methods of BBjDataBoundGrid implemented for Focusable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setFocusable(boolean focus) |
Methods of BBjDataBoundGrid implemented for MouseWheelEnabled
| Return Value | Method |
|---|---|
|
int |
|
|
void |
setScrollWheelBehavior(int mode) |
Methods of BBjDataBoundGrid implemented for SimpleRecordSetBindable
| Return Value | Method |
|---|---|
|
void |
Methods of BBjDataBoundGrid implemented for TabTraversable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setTabTraversable(boolean trav) |
Events
|
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
|
ON_DB_GRID_ROW_CHANGE_REQUEST |
N/A |
x |
Remarks
BBjDataBoundGrid also generates all the events of a BBjGrid except ON_GRID_HIT_BOTTOM, ON_GRID_HIT_TOP, ON_GRID_TOP_ROW_CHANGE, and ON_GRID_UPDATE.
Clicking in a cell that is not in the currently selected row the BBjDataBoundGrid will generate a DBGridRowChangeRequestEvent but it will not change the currently selected row. The program must examine the DBGridRowChangeRequestEvent and call the method BBjRecordSet::moveToRecord() to change the current record of the BBjRecordSet. Changing the current record of the BBjRecordSet will cause the selected row of the BBjDBGrid to change.
Example
|
See Also
BBj Object Creation and Assignment
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.