Spread Windows Forms 9.0 Product Documentation
RowHeaderColumnCount Property
Example 


Gets or sets the number of columns in the row header on this sheet.
Syntax
'Declaration
 
Public Property RowHeaderColumnCount As Integer
'Usage
 
Dim instance As SheetView
Dim value As Integer
 
instance.RowHeaderColumnCount = value
 
value = instance.RowHeaderColumnCount
public int RowHeaderColumnCount {get; set;}

Property Value

Integer number of columns in the row header
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeException Specified column 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 columns in the row header. When you set this property to a value greater than 1, additional columns are added to the row header.

This property is equivalent to RowHeader.ColumnCount.

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

If you set this property to a value greater than 1, you can specify which column displays the automatic text by setting the RowHeaderAutoTextIndex property (or RowHeader.AutoTextIndex property). The right-most header column displays the automatic text, as defined in the AutoText property, unless another header column is specified by the AutoTextIndex property.

This property does not have an effect unless the RowHeaderVisible property (or the RowHeader.Visible property) is set to true and the row header columns are not hidden.

Tip: If the Spread component displays multiple header columns such that the row 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 row header columns.

Set the SheetView.ColumnHeaderRowCount property (or ColumnHeader.RowCount 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
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetView Class
SheetView Members
RowHeaderAutoTextIndex Property

User-Task Documentation

Creating a Header with Multiple Rows or Columns

 

 


Copyright © GrapeCity, inc. All rights reserved.