Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

GridLines

This property determines whether horizontal gridlines, vertical gridlines, or both should be displayed in a grid.

Usage

grdGrid.GridLines = nGridValue
nGridValue = grdGrid.GridLines

Parameter

Value

Meaning

nGridValue

0

Display no gridlines.

1

Display only horizontal gridlines.

2

Display only vertical gridlines.

3

The default: Display both horizontal and vertical gridlines.

Horizontal and vertical gridlines can take up a lot of space on the grid and distract from what the client is there to see—the data. Turn off distracting gridlines if the form can still be read without them. Better yet, include a toggle so the viewer can turn them on and off as desired! Consider other ways of separating records, like DynamicBackColor, if grid lines don’t work for you. You’ll probably want to turn off RecordMark and DeleteMark while you’re at it, too, but short of hiding the headers altogether, we haven’t found a way to get the separator lines between them to disappear.

Example

frmFormOne.grdMyDataGrid.GridLines = 1  && horizontal only

See Also

DeleteMark, DynamicBackColor, Grid, GridLineColor, GridLineWidth, RecordMark