Spread Windows Forms 7.0 Product Documentation
Setting Fixed (Frozen) Rows or Columns
Support Options
Spread Windows Forms 7.0 Product Documentation > Developer's Guide > Customizing Row or Column Interaction > Allowing User Interaction with Rows and Columns > Setting Fixed (Frozen) Rows or Columns

Glossary Item Box

You can freeze (make unscrollable) a number of either rows or columns or both in a sheet. You can freeze any number of top rows, called leading rows or any number of left-most columns, called leading columns. You can also freeze any number of the trailing bottom rows or trailing right-most columns. The frozen leading rows and columns stay at the top and left of the view regardless of the scrolling. The frozen trailing rows and columns stay at the bottom and right of the view regardless of the scrolling.

The figure below displays one frozen trailing row and column that stay in view:

Spreadsheet with One Fixed Trailing Row and One Fixed Trailing Column

Properties involved with frozen rows and columns are:

Frozen rows or columns are nonscrollable at run time, but during design time, they are still scrollable.

Trailing frozen rows and columns are not printed repeatedly at the bottom and right of every page, but print only once as the last row and column. Leading frozen rows and columns can be repeated. For more information about repeating rows and columns, refer to Repeating Rows or Columns on Printed Pages.

The leading frozen row or column is a separate viewport while the trailing frozen row or column is also a separate viewport. Indexes for the frozen viewports are:

Indexes of Frozen Rows or Columns

For more information about viewports, refer to Customizing Viewports.

In hierarchical displays, frozen leading rows and columns are possible in child sheets.

Using the Properties Window

  1. At design time, in the Properties window, select the Sheet.
  2. In the SheetView Collection Editor (Appearance section), select the FrozenRowCount, FrozenColumnCount, FrozenTrailingRowCount, or the FrozenTrailingColumnCount property.
  3. Type a value. (The default is 0.) Repeat this for each property.

Using Code

Set the FrozenRowCount, FrozenColumnCount, FrozenTrailingColumnCount, or the FrozenTrailingRowCount property for the sheet.


C# Copy Code
fpSpread1.Sheets[0].FrozenColumnCount = 2;
fpSpread1.Sheets[0].FrozenRowCount = 2;
fpSpread1.Sheets[0].FrozenTrailingColumnCount = 2;
fpSpread1.Sheets[0].FrozenTrailingRowCount = 2;
VB Copy Code
FpSpread1.Sheets(0).FrozenColumnCount = 2
FpSpread1.Sheets(0).FrozenRowCount = 2
FpSpread1.Sheets(0).FrozenTrailingColumnCount = 2
FpSpread1.Sheets(0).FrozenTrailingRowCount = 2

Using the Spread Designer

  1. Select Sheet from the drop-down combo list located on the top right side of the Designer.
  2. From the SheetView Collection Editor, type a number for FrozenColumnCount, FrozenRowCount, FrozenTrailingColumnCount, or FrozenTrailingRowCount.
  3. From the File menu, select Save and Exit to save the changes.
© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.