BBjStandardGrid::clear

Description

In BBj 19.0 and higher, this method removes all restore, images, related, text, column and row header, and selection data from the grid in the BBjStandardGrid.

Syntax

Return Value

Method

void

clear()

void

clear(int p_row, int p_column)

Parameters

Variable

Description

p_row

Specifies the 0-based row of the grid cell where related text will be cleared.

p_column

Specifies the 0-based column of the grid cell where related text will be cleared.

Return Value

None.

Remarks

Not specifying a row or column will clear all data in the grid, including in the column and row headers and clearing the current cell, row and column selections.  Specifying a row and column will only clear the data from that grid cell and deselect it if selected.

Example

BEGIN
bbj!=bbjapi()

SYSGUI=UNT
OPEN (SYSGUI)"X0"

gui!=bbj!.getSysGui()
mainWindow! = gui!.addWindow(100,100,202,160,TITLE$,$00010013$)

g! = mainWindow!.addGrid(100,3,26,198,121)
g!.setNumRows(2)
g!.setNumColumns(2)
mainWindow!.setVisible(gui!.TRUE)

g!.setCellData(0,0,"test","hello")
g!.setCellRestore(0,0,"Dolly Ding Dong")

g!.setCellData(0,1,"Bob","Goodbye")
g!.setCellRestore(0,1,"Dodo Bird")

g!.setCellData(1,1,"Sasha","Shalom")
g!.setCellRestore(1,1,"Raptor")

g!.clear()

print "RESULTS!"
print "cell 0,0 text: "+g!.getCell(0,0).getText()
print "cell 0,0 related: "+g!.getCell(0,0).getRelated()
print "cell 0,0 restore: "+g!.getCell(0,0).getRestore()
print ""

print "cell 0,1 text: "+g!.getCell(0,1).getText()
print "cell 0,1 related: "+g!.getCell(0,1).getRelated()
print "cell 0,1 restore: "+g!.getCell(0,1).getRestore()

print ""
print "cell 1,1 text: "+g!.getCell(1,1).getText()
print "cell 1,1 related: "+g!.getCell(1,1).getRelated()
print "cell 1,1 restore: "+g!.getCell(1,1).getRestore()
print ""

escape

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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