BBjStandardGrid
Description
A BBjStandardGrid provides methods for manipulating a standard grid control in BBj. For Data Aware grids see BBjDataAwareGrid. The BBjStandardGrid extends the BBjGrid object and therefore implements all methods in the BBjGrid. A BBjStandardGrid can be converted to a BBjDataAwareGrid using the method BBjStandardGrid::convertToDataAware. After conversion, the BBjStandardGrid object is no longer valid.
Implemented Interfaces
CommonGrid, Focusable, MouseWheelEnabled, TabTraversable, Validateable
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjStandardGrid
A BBjStandardGrid object is created through the following BBjWindow methods:
| Return Value | Method |
|---|---|
|
BBjStandardGrid |
addGrid() addGrid(int ID) addGrid(int ID, int rowHeaderID, int columnHeaderID, number x, number y, number w, number h) addGrid(int ID, int rowHeaderID, int columnHeaderID, number x, number y, number w, number h, string flags) addGrid(int ID, int rowHeaderID, int columnHeaderID, number x, number y, number w, number h, string flags, int rows, int columns) addGrid(int ID, number x, number y, number w, number h) addGrid(int ID, number x, number y, number w, number h, string flags) addGrid(int ID, number x, number y, number w, number h, string flags, int rows, int columns) addGrid(int ID, string flags) addGrid(int ID, string flags, int rows, int columns) addGrid(string flags) addGrid(string flags, int rows, int columns) |
Creation Flags
| Flags | Description |
|---|---|
| $0001$ | Sets the grid control to be initially disabled. |
| $0002$ | Creates a managed grid control as a column heading. |
| $0004$ | Creates a managed grid control as a row 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:
print(sysgui) 'show'(id) |
| $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 BBjStandardGrid – Grid Headers
|
Return Value |
Method |
|---|---|
|
int |
|
|
int |
|
|
void |
setHasRowHeader(int header) |
|
void |
setRowHeaderWidth(int width) |
Methods of BBjStandardGrid – Grid Rows and Columns
|
Return Value |
Method |
|---|---|
|
void |
clearRowHeader(int p_row) |
|
void |
clearColumnHeader(int p_column) |
|
void |
deleteColumn(int column) |
|
void |
deleteRow(int row) |
|
BBjVector |
getHiddenColumns(int p_startColumn, int p_endColumn) |
|
BBjVector |
getHiddenRows(int p_startRow, int p_endRow) |
|
int |
getMaxColumns() - Deprecated in BBj 12.00 |
|
int |
|
|
int |
getRowModelIndexFromViewIndex(int index) |
|
int |
getRowViewIndexFromModelIndex(int index) |
|
int |
|
|
void |
hideColumn(int p_column) |
|
void |
hideColumns(BBjVector p_columns) hideColumns(int p_startColumn, int p_endColumn) |
|
void |
hideRow(int p_row) |
|
void |
hideRows(BBjVector p_rows) hideRows(int p_startRow, int p_endRow) |
|
void |
insertColumn(int index) |
|
void |
insertRow(int index) |
|
boolean |
isColumnHidden(int p_column) |
|
boolean |
isColumnSortedByRelatedData(int columnIndex) |
|
boolean |
isColumnUserSortable(int columnIndex) |
|
boolean |
isRowHidden(int p_row) |
|
void |
resort() |
|
void |
setAllColumnsUserSortable(boolean p_sortable) |
|
void |
setColumnUserSortable(int columnIndex, boolean p_sortable) |
|
void |
sortByColumn(int columnIndex, int sortOrder) |
|
void |
setColumnSortedByRelatedData(int columnIndex, boolean sortByRelated) |
|
void |
setMaxColumns(int max) - Deprecated in BBj 12.00 |
|
void |
setMaxRows(int max) |
|
void |
setNumColumns(int columns) |
|
void |
setNumRows(int rows) |
|
void |
setSortByMultipleColumns(boolean sortByMultiple) |
|
void |
unhideColumn(int p_column) |
|
void |
unhideColumns(BBjVector p_columns) unhideColumns(int p_startColumn, int p_endColumn) |
|
void |
unhideRow(int p_row) |
|
void |
unhideRows(BBjVector p_rows) unhideRows(int p_startRow, int p_endRow) |
|
void |
unsort() unsort(boolean revertAllSortByRelated, boolean revertAllUserSortable) |
Methods of BBjStandardGrid – Grid Cell Contents
|
Return Value |
Method |
|---|---|
|
void |
clear() clear(int p_row, int p_column) |
|
void |
|
|
void |
clearImage(int p_row, int p_column) |
|
void |
clearMainGrid()- Deprecated in BBj 19.00 |
|
void |
clearRelated(int p_row, int p_column) |
|
void |
clearRestore(int p_row, int p_column) |
|
void |
clearText(int p_row, int p_column) |
|
string |
getCellMask(int row, int column) |
|
string |
getCellRelated(int row, int column) |
|
string |
getCellRestore(int row, int column) |
|
boolean |
|
|
string |
|
|
string |
|
|
boolean |
|
|
string |
getRowHeaderCellText(int row) |
|
int |
|
|
int |
|
|
void |
restoreCell(int row, int col) |
|
void |
restoreRow(int row) |
|
void |
setCellData(int row, int column, string text, string related) |
|
void |
setCellIcon(int imageListID, int index, int row, int column) |
|
void |
setCellImage(int row, int column, BBjImage image!) setCellImage(BBjVector p_cells, BBjImage image!) |
|
void |
setCellMask(int row, int column, string mask) |
|
void |
setCellRelated(int row, int col, string text) setCellRelated(int startRow, int startCol, BBjVector strings!) |
|
void |
setCellRestore(int row, int column, string restore) |
|
void |
setCellText(BBjVector strings!) setCellText(int row, int column, string text) setCellText(int startRow, int startCol, BBjVector strings!) |
|
void |
setDefaultColumnText(int column, string text) |
|
void |
setInputNBeep(boolean shouldBeep) |
|
void |
setInputNCommaCharacter(string charString) |
|
void |
setInputNDotCharacter(string charString) |
|
void |
setInputNUseEditCommas(boolean shouldUse) |
|
void |
setRowHeaderCellIcon(int imageListID, int index, int row) |
|
void |
setRowHeaderCellImage(int row, BBjImage image!) |
|
void |
setRowHeaderCellText(int row, string text) |
|
void |
setRowHeaderText(BBjVector strings!) |
|
void |
setRowHeaderWidth(int width) |
|
void |
setUpdateCached(boolean update) |
Methods of BBjStandardGrid – Grid Cell Editing
|
Return Value |
Method |
|---|---|
|
int |
isCellEditable(int row, int column) |
|
void |
setCellEditable(int row, int column, int editable) |
|
int |
isGridEditable() – Deprecated, useisEditable() |
|
void |
setGridEditable() – Deprecated, usesetEditable(int editable) |
Methods of BBjStandardGrid – Grid Cell Style
|
Return Value |
Method |
|---|---|
|
int |
getCellState(int row, int column) |
|
int |
getCellStyle(int row, int column) |
|
int |
getRowHeaderCellStyle(int row) |
|
int |
|
|
void |
setCellState(int row, int column, int state) |
|
void |
setCellStyle(int row, int column, int style) |
|
void |
setRowHeaderCellStyle(int row, int style) |
|
void |
setRowHeaderStyle(int style) |
|
void |
setRowStyle(int row, int style) |
Methods of BBjStandardGrid – Grid Cell Alignment
|
Return Value |
Method |
|---|---|
|
int |
|
|
int |
getRowHeaderCellVerticalAlignment(int row) |
|
void |
setRowHeaderVerticalAlignment(int align) |
|
void |
setRowHeaderCellAlignment(int row, int align) |
|
void |
setRowHeaderCellVerticalAlignment (int row, int align) |
Methods of BBjStandardGrid – Grid Cell Query
|
Return Value |
Method |
|---|---|
|
boolean |
getCellHasQuery(int row, int column) |
|
boolean |
getColumnHasQuery(int column) |
|
void |
setCellHasQuery(int row, int column, boolean hasQuery) |
|
void |
setColumnHasQuery(int column, boolean hasQuery) |
Methods of BBjStandardGrid – Grid Colors
|
Return Value |
Method |
|---|---|
|
getCellBackColor(int row, int column) |
|
|
getCellForeColor(int row, int column) |
|
|
getRowHeaderCellBackColor(int row) |
|
|
getRowHeaderCellForeColor(int row) |
|
|
void |
setCellBackColor(int row, int column, BBjColor color!) |
|
void |
setCellForeColor(int row, int column, BBjColor color!) |
|
void |
setRowBackColor(int row, BBjColor color!) |
|
void |
setRowForeColor(int row, BBjColor color!) |
|
void |
setRowHeaderBackColor(BBjColor color!) |
|
void |
setRowHeaderCellBackColor(int row, BBjColor color!) |
|
void |
setRowHeaderCellForeColor(int row, BBjColor color!) |
|
void |
setRowHeaderForeColor(BBjColor color!) |
Methods of BBjStandardGrid – Grid Fonts
|
Return Value |
Method |
|---|---|
|
getCellFont(int row, int column) |
|
|
getRowFont(int row) |
|
|
void |
setCellFont(int row, int column, BBjFont font!) |
|
void |
setRowFont(int row, BBjFont font!) |
|
void |
setRowHeaderFont(BBjFont font!) |
Methods of BBjStandardGrid – List Control in Grid
|
Return Value |
Method |
|---|---|
|
BBjComboBox |
getCellListControl(int row, int column) |
|
int |
getCellListSelection(int row, int column) |
|
BBjComboBox |
getColumnListControl(int column) |
|
int |
getColumnListSelection(int column) |
|
void |
setCellListControl(int row, int column, BBjComboBox list!) |
|
void |
setCellListSelection(int row, int column, int sel, int redraw) |
|
void |
setColumnListControl(int column, BBjComboBox list!) |
|
void |
setColumnListSelection(int column, int index, int repaint) |
|
void |
setSelectedCell(int row, int column) setSelectedCell(BBjGridCell gridCell!) |
Methods of BBjStandardGrid inherited from BBjGrid
Methods of BBjStandardGrid inherited from BBjControl
Methods of BBjStandardGrid – Miscellaneous Grid Functions
|
Return Value |
Method |
|---|---|
|
convertToDataAware(int channel, string template) |
Methods of BBjStandardGrid implemented for CommonGrid
| Return Value |
Method |
|---|---|
|
void |
endEdit() |
|
int |
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 BBjStandardGrid implemented for Focusable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setFocusable(boolean focus) |
Methods of BBjStandardGrid implemented for MouseWheelEnabled
| Return Value | Method |
|---|---|
|
int |
|
|
void |
setScrollWheelBehavior(int mode) |
Methods of BBjStandardGrid implemented for TabTraversable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setTabTraversable(boolean trav) |
Methods of BBjStandardGrid implemented for Validateable
| Return Value | Method |
|---|---|
|
void |
accept(boolean valid) |
|
string |
Events
Events
|
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
|---|---|---|---|
|
ON_GRID_CELL_QUERY |
N (Notify code 33) |
Constants
| BBjStandardGrid Constants |
|---|
|
SORT_ASCENDING |
|
SORT_DESCENDING |
|
SORT_NONE |
| Style Value Constants | |
|---|---|
|
GRID_STYLE_BUTTON_DOWN |
Recessed button |
|
GRID_STYLE_BUTTON_UP |
Raised button |
|
GRID_STYLE_CHECKED |
Checked checkbox |
|
GRID_STYLE_INPUTD |
InputD |
|
GRID_STYLE_INPUTE |
InputE |
|
GRID_STYLE_INPUTN |
InputN |
|
GRID_STYLE_LABEL |
Label |
|
GRID_STYLE_LISTBUTTON |
List button |
|
GRID_STYLE_LISTEDIT |
List edit |
|
GRID_STYLE_PASSWORD |
Password edit box |
|
GRID_STYLE_TEXT |
Text field |
|
GRID_STYLE_UNCHECKED |
Unhecked checkbox |
Constants inherited from BBjGrid
Constants inherited from BBjControl
Example
|
See Also
CALLBACK Verb - Register BBj Subroutine
GRID Mnemonic - Create a Grid Control
See the BBj Object Diagram for an illustration of the relationship between BBj Objects and the Grid Tutorial 2 - Standard Grid Using BBjGrid Methods for more information.