BBjStandardGrid::getColumnHasQuery

Description

In BBj 8.0 and higher, this returns whether all cells in the specified BBjStandardGrid column have associated query buttons.

Syntax

Return Value

Method

boolean

getColumnHasQuery(int row, int column)

Parameters

Variable

Description

column

Specifies the 0-based column.

Return Value

Returns whether all cells in the specified grid column have associated query buttons.

Remarks

When the user clicks on a grid cell query button, the grid fires a Grid Cell Query Event. This is a validation-style event, which must be acknowledged by invoking the accept() method.

Example

rem ' Grid Cell Query

sysgui = unt
open (sysgui)"X0"
sysgui! = BBjAPI().getSysGui()
window! = sysgui!.addWindow(200,200,200,230,"GridQuery",$00010003$)
grid! = window!.addGrid(101,102,103,10,10,180,210)
grid!.setHasColumnHeader(1)
grid!.setColumnHeaderHeight(20)
grid!.setNumColumns(2)
grid!.setNumRows(9)
grid!.setRowHeight(20)
grid!.setUserResizable(1)
grid!.setFitToGrid(1)
grid!.setEditable(1)
grid!.deselectAllCells()
grid!.setCellHasQuery(0,0,1)
hasQuery = grid!.getCellHasQuery(0,0)
grid!.setColumnHasQuery(1,1)
hasQuery = grid!.getColumnHasQuery(1)
grid!.setCallback(grid!.ON_GRID_CELL_QUERY,"cellQuery")
window!.setCallback(window!.ON_CLOSE,"eoj")
process_events

eoj:
release

cellQuery:
    declare auto BBjGridCellQueryEvent query!
    query! = BBjAPI().getSysGui().getLastEvent()
    row = query!.getRow()
    col = query!.getColumn()
    msg$ = "BBjGridQueryEvent "+str(query!.getRow())+" "+str(query!.getColumn())
    i = msgbox(msg$)
    grid!.setCellText(row,col,"query")
    grid!.accept(1)
return

end

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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