Grid Controls Overview

For BBj-specific information, see Grid Enhancement Information - BBj.

A grid control can be used wherever tabular information needs to be displayed or edited in a graphical interface. The Visual PRO/5 grid control supports up to 255 columns and 2.1 billion rows. The grid control can optionally manage column and/or row headings. The headings are separate grid controls with unique control IDs that the main grid manages automatically. Heading grids are placed inside the grid's bounding rectangle, reducing the size of the grid body.

There are two basic modes for grid controls: data aware and standard. Data-aware grids display values in a file and handle file I/O automatically. Standard grids do not perform any file I/O or automatic displaying. The program displays data in cells and gets user input, if necessary. For additional information, see Standard and Data-Aware Grids.

Grid controls can be defined in ResBuilder or with the 'GRID' mnemonic. Not all grid attributes can be set when the grid is created. Many grid attributes can be changed by the application at run time. These attributes include the number of rows and columns, optional column and row headers, cell dimensions, colors, the alignment of text in cells, and cell styles. The default cell style for cells in the body of a grid control is to operate as INPUTE controls. Cell style can also be set to make cells look like check boxes or buttons. The column and row heading cell's default style is raised button. The grid control makes extensive use of the SENDMSG() function and the Notify event. A basic understanding of SENDMSG() and Notify is required to program a grid control.

For an introduction to these concepts, see "Event-Driven GUI Programming With Notify and SENDMSG()" in the Spring 1998 BASIS Advantage at https://www.basis.cloud/.