You can specify whether you want frozen rows or columns or both in a sheet. Frozen columns and rows do not scroll. You can also specify whether to have frozen trailing rows or columns. A line is displayed below frozen rows (or above frozen trailing rows) and to the right of frozen columns (or to the left of frozen trailing columns).
Frozen rows stay at the top of the sheet and frozen columns stay on the left of the sheet. Frozen trailing rows stay at the bottom of the sheet and frozen trailing columns stay on the right of the sheet.
You can specify the number of frozen rows or columns in code with the following properties:
The following example creates frozen rows and columns as well as frozen trailing rows and columns.
CS |
Copy Code |
---|---|
gcSpreadSheet1.Sheets[0].RowCount = 10; gcSpreadSheet1.Sheets[0].ColumnCount = 8; gcSpreadSheet1.Sheets[0].FrozenColumnCount = 1; gcSpreadSheet1.Sheets[0].FrozenRowCount = 1; gcSpreadSheet1.Sheets[0].FrozenTrailingColumnCount = 1; gcSpreadSheet1.Sheets[0].FrozenTrailingRowCount = 1; gcSpreadSheet1.Invalidate(); |
VB.NET |
Copy Code |
---|---|
GcSpreadSheet1.Sheets(0).RowCount = 10 GcSpreadSheet1.Sheets(0).ColumnCount = 8 GcSpreadSheet1.Sheets(0).FrozenColumnCount = 1 GcSpreadSheet1.Sheets(0).FrozenRowCount = 1 GcSpreadSheet1.Sheets(0).FrozenTrailingColumnCount = 1 GcSpreadSheet1.Sheets(0).FrozenTrailingRowCount = 1 GcSpreadSheet1.Invalidate() |