Spread 8.0 Documentation
MaxRows Property
Support Options
ActiveX Reference > ActiveX Properties > MaxRows Property

Glossary Item Box

MaxRows Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the number of rows in the sheet.

Syntax

C++

long CSpreadSheet::GetMaxRows( );
void CSpreadSheet::SetMaxRows(long value);

Visual Basic

[form.]fpSpread.MaxRows[ = value&]

Remarks

The default value for the MaxRows property is 500. The maximum number of available rows is two billion.

This setting is applied to the current sheet setting unless you first set the Sheet property to specify the sheet for which you are setting the property.

You can return the row number of the last row that contains data using the DataRowCnt property.

To increase the maximum number of rows when a row is inserted, first use the MaxRows property to increment the maximum number of rows by one, then use the InsertRows method to insert the row.

A gray area appears below the last row in the sheet, between the sheet and the fpSpread control. You can set the color of this gray area using the GrayAreaBackColor property.

Note: When you load a file into the sheet, the settings for the MaxCols and MaxRows properties change to the number of columns and rows in the loaded file.For more information about loading files into the fpSpread control, see Adding Data.

Spread Designer

Choose the Sheet menu, then the Columns and Rows menu, select the Rows tab, and then type a number in the Max Rows edit box in the Settings-All Rows group box in the Column and Row Settings dialog box.

In the Spread Designer, when you turn virtual mode on, by default the VirtualMaxRows and MaxRows properties are set to 1 million rows. If you do not specify a value for the VirtualMaxRows property and you turn off virtual mode, the value of the MaxRows property is still set to 1 million rows. When you exit the Spread Designer, the control verifies row by row if any cell changed.

If you exit the Spread Designer without changing the VirtualMaxRows or MaxRows property, the control will verify 1 million rows. The control appears to be hung when in reality it is checking the 1 million rows. To avoid this problem, when you exit Spread Designer, a message box appears asking whether or not you would like to reset the MaxRows property to its default value of 500 rows.

Data Type

Long Integer

See Also

Specifying the Maximum Number of Rows
Setting the Maximum Number of Columns and Rows

DataRowCnt, MaxCols, Sheet, VirtualMaxRows properties

InsertRows method

DLL Correspondence

SSGetMaxRows, SSSetMaxRows functions

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.