Spread Windows Forms 6.0 Product Documentation
RowCount Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > ColumnHeader Class : RowCount Property


Glossary Item Box

Gets or sets the number of rows in the column header.

Syntax

Visual Basic (Declaration) 
Public Property RowCount As Integer
Visual Basic (Usage)Copy Code
Dim instance As ColumnHeader
Dim value As Integer
 
instance.RowCount = value
 
value = instance.RowCount
C# 
public int RowCount {get; set;}

Property Value

Integer number of rows in the header

Exceptions

ExceptionDescription
System.ArgumentOutOfRangeException Specified row count is less than 0 or greater than 256.

Remarks

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. The maximum value allowed is 256. The minimum value allowed is 0.

This property is equivalent to SheetView ColumnHeaderRowCount.

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 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 Visible property (or the SheetView ColumnHeaderVisible 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 component and adding multiple column header rows.

Set the RowHeader ColumnCount property (or SheetView RowHeaderColumnCount 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 Headers with Multiple Columns or Rows.

Example

This example specifies the number of rows in the column headers.
C#Copy Code
FarPoint.Win.Spread.ColumnHeader ch;
FarPoint.Win.Spread.NamedStyle style = new FarPoint.Win.Spread.NamedStyle("ColumnHeader");
ch = fpSpread1.ActiveSheet.ColumnHeader;
ch.RowCount = 3;
style.BackColor = Color.Teal;
fpSpread1.NamedStyles.Add(style);
ch.DefaultStyleName = "ColumnHeader";
Visual BasicCopy Code
Dim ch As FarPoint.Win.Spread.ColumnHeader
Dim style As New FarPoint.Win.Spread.NamedStyle("ColumnHeader")
ch = FpSpread1.ActiveSheet.ColumnHeader
ch.RowCount = 3
style.BackColor = Color.Teal
FpSpread1.NamedStyles.Add(style)
ch.DefaultStyleName = "ColumnHeader"

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.