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:
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:
For more information about viewports, refer to Customizing Viewports.
In hierarchical displays, frozen leading rows and columns are possible in child sheets.
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 |