BBjGrid::getCellRange

Description

In BBj 18.00 and higher, this method returns a range of specified BBjGridCells in BBjGrid range of cells. The data returned is a snapshot of the current state of the grid only and does not get updated if anything changes within the BBjGrid.

Syntax

Return Value

Method

BBjGridData

getCellRange(int startRow, int startCol, int endRow, int endCol)

Parameters

Variable

Description

startRow

The starting row of a grid.

startCol

The starting column of a grid.

endRow

The ending row of a grid.

endCol

The ending column of a grid.

Return Value

Returns the BBjGridData for the BBjGridCells in a row and column range, specified by the user, between rows (p_startRow and p_endRow) and columns (p_startCol and p_endCol).

Example

sysgui! = bbjapi().openSysGui("X0")

window! = sysgui!.addWindow(10,10,520,300,"Grid Events",$00010082$)
window!.setCallback(window!.ON_CLOSE,"APP_CLOSE")

grid! = window!.addGrid(101,102,103,10,10,500,200,$000e$)
grid!.setRowHeight(20)
cols=30,rows=10
grid!.setNumColumns(cols)
grid!.setNumRows(rows)
grid!.setDefaultColumnWidth(50)
grid!.setUserResizable(1)

cells! = bbjapi().makeVector()
for row=0 to rows-1
    for col=0 to cols-1
        cells!.addItem("C"+STR(col)+" R"+STR(row))
    next col
next row
grid!.setCellText(cells!)

data! = grid!.getCellRange(1,0,5,7)

process_events

APP_CLOSE:
release

See Also

BBjAPI

BBjGrid::getRowData

BBjGrid::getColumnData

BBjGridCell

BBjGridData

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.