Spread Windows Forms 12.0 Product Documentation
ColumnHeaderRowCount Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : ColumnHeaderRowCount Property
Gets or sets the number of rows in the column headers for the sheet.
Syntax
'Declaration
 
Public Property ColumnHeaderRowCount As Integer
'Usage
 
Dim instance As SheetView
Dim value As Integer
 
instance.ColumnHeaderRowCount = value
 
value = instance.ColumnHeaderRowCount
public int ColumnHeaderRowCount {get; set;}

Property Value

Integer number of rows in the column header
Exceptions
ExceptionDescription
Specified row count is out of range; must be between 0 and 256
Remarks

The maximum value allowed is 256. The minimum value allowed is 0.

Use this property to specify the number of rows in the column header. When you set this property to a value greater than 1, additional rows are added to the column header.

This property is equivalent to ColumnHeader.RowCount.

The added rows display the column header appearance (the background, text, and border colors) but are blank by default. Use the Text property to add content to the additional rows.

If you set this property to a value greater than 1, you can specify which row displays the automatic text by setting the ColumnHeaderAutoTextIndex property (or the ColumnHeader.AutoTextIndex Property). The bottom header row displays the automatic text, as defined in the AutoText property, unless another header row is specified by the AutoTextIndex property.

This property does not have an effect unless the SheetView.ColumnHeaderVisible property (or the ColumnHeader.Visible property) is set to true and the column header rows are not hidden.

Tip: If the Spread component displays multiple header rows such that the column headers fill the entire view of the spreadsheet, users cannot scroll to the data portion of the spreadsheet. Keep this in mind when sizing the Spread component and adding multiple column header rows.

Set the SheetView.RowHeaderColumnCount property (or RowHeader.ColumnCount property) to specify the number of columns to display as the row header.

For more information about headers with multiple columns or rows, see Creating a Header with Multiple Rows or Columns.

Example

This example sets up a number of column and row headers for the spreadsheet and changes the location of the header text and its type.

fpSpread1.ActiveSheet.ColumnHeaderRowCount = 3;
fpSpread1.ActiveSheet.RowHeaderColumnCount = 2;
fpSpread1.ActiveSheet.ColumnHeaderAutoText = FarPoint.Win.Spread.HeaderAutoText.Numbers;
fpSpread1.ActiveSheet.ColumnHeaderAutoTextIndex = 0;
fpSpread1.ActiveSheet.RowHeaderAutoText = FarPoint.Win.Spread.HeaderAutoText.Letters;
fpSpread1.ActiveSheet.RowHeaderAutoTextIndex = 0;
FpSpread1.ActiveSheet.ColumnHeaderRowCount = 3
FpSpread1.ActiveSheet.RowHeaderColumnCount = 2
FpSpread1.ActiveSheet.ColumnHeaderAutoText = FarPoint.Win.Spread.HeaderAutoText.Numbers
FpSpread1.ActiveSheet.ColumnHeaderAutoTextIndex = 0
FpSpread1.ActiveSheet.RowHeaderAutoText = FarPoint.Win.Spread.HeaderAutoText.Letters
FpSpread1.ActiveSheet.RowHeaderAutoTextIndex = 0
See Also

Reference

SheetView Class
SheetView Members

User-Task Documentation

Creating a Header with Multiple Rows or Columns