FixedRows Property

Returns or sets the number of fixed (non-scrollable) rows.

Syntax

[form!]VSFlexGrid.FixedRows[ = value As Long ]

Remarks

Fixed rows remain visible when the user scrolls the contents of the grid. They are not selectable or editable by the user (but you can select them with code and even allow the user to edit their contents by selecting them and invoking the EditCell method). You can set FixedRows to any value between zero and the total number of rows.

The following line of code places 3 fixed rows at the top edge of the grid.

   fg.FixedRows = 3

Fixed rows are typically used in spreadsheet applications to display column headers, and in database applications to display field names.

To format the fixed cells, use the BackColorFixed, ForeColorFixed, GridLinesFixed, and FixedAlignment properties.

You can create non-scrollable rows that can be selected and edited using the FrozenRows property.

If the AllowUserResizing property is set to a non-zero value, the fixed cells allow the user to resize row heights and column widths at run time. If the ExplorerBar property is set to a non-zero value, the fixed rows allow the user to sort and move columns with the mouse.

Data Type

Long

See Also

VSFlexGrid Control