Rowsproperty
Returns or sets the total number of rows in an MSHFlexGrid.
Syntax
PROPERTY Rows () AS LONG
PROPERTY Rows (BYVAL nRows AS LONG)
Parameters
| Name | Description | |
|---|---|---|
nRows | Specifies the total number of rows, including both data rows and fixed (header) rows. The value of nRows must be at least one greater than the value of FixedRows, unless they are both set to zero. |
Description
Returns or sets the total number of rows in the grid. It is used both to set the capacity of the grid and to retrieve the current row count.
Remarks
Dynamic resizing: You can increase or decrease the number of rows at runtime by simply assigning a new value to the property.
Automatic management: When bound to a data source, the MSHFlexGrid typically sets the Rows property automatically based on the number of records in the recordset plus the number of fixed rows.
Zero-based indexing: Row indexing starts at 0. If you have 1 fixed row, it is Row 0; the first data row will be Row 1.
Memory limit: The minimum number of rows and columns is 0. The maximum number is limited by the memory available on your computer.
Examples
' Increment the row count by one grid.Rows = MSHFlexGrid1.Rows + 1
' Resets the grid to only display the fixed header grid.Rows = 1
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid