BBjGrid::setCells

Description

In BBj 18.0 and higher, this method sets a BBjVector of BBjGridCells to the grid. The default data contained within the BBjGridCells will not get updated to the grid. Only the changed user-specific data within the BBjGridCells will be changed.

Syntax

Retrun Vale

Method

void

setCells(BBjVectorp_cells)

Parameters

Variable

Description

BBjVector

A BBjVector of BBjGridCells to change.

Return Value

None.

Remarks

None.

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!)

cell1! = grid!.getCell(1,1)

cell1!.setText("One")
cell2! = grid!.getCell(2,1)
cell2!.setText("Two")
cell3! = grid!.getCell(3,1)
cell3!.setText("Three")

myVector!=BBjAPI().makeVector()
myVector!.addItem(cell1!)
myVector!.addItem(cell2!)
myVector!.addItem(cell3!)

grid!.setCells(myVector!)

process_events

APP_CLOSE:
release

See Also

BBjAPI

BBjGrid

BBjGrid::getCellRange

BBjGrid::getColumnData

BBjGrid::getRowData

BBjGridCell

BBjGridData

BBj Object Diagram for an illustration of the relationship between BBjObjects.