Spread for ASP.NET 7.0 Product Documentation
AutoTextIndex Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > RowHeader Class : AutoTextIndex Property


Glossary Item Box

Gets or sets which row header column displays the automatic text when there are multiple row header columns.

Syntax

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

Property Value

Integer number representing the zero-based column index

Remarks

If your header has multiple row header columns, you can specify which header column displays the automatic text by setting this property. To specify the index, set the property to a value between 0 and n-1, where 0 is the left-most column and n is the number of header columns. Any value above n-1 simply puts the automatic text in the right-most column.

The automatic text is the text automatically assigned to header cells by Spread. By default, for rows the automatic text is numbers. Use the AutoText property to change the automatic text to blank or to letters. Use the AutoText property to specify what automatic text, if any, is displayed in the row headers. If you set the AutoText property to Blank, the row header column specified by the AutoTextIndex property is blank. Use the ColumnCount property to specify how many row header columns the component displays. Use the ColumnHeader object AutoTextIndex property to specify which column header row displays the automatic text.

If you set this property to specify a column to display the automatic text, for example, header column 3, and then later change the number of row header columns to be less than 3, the label is displayed in the right-most column, as if the ColumnCount property is set to -1. However, if you then change the number of row header columns to 3 or greater, the label is again displayed in header column 3.

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

For more information about automatic text, see Customizing the Default Header Labels.

Example

This example sets the row header to have three columns and to display the letters in the second of the three columns in the row header.
C#Copy Code
FarPoint.Web.Spread.RowHeader rhdr;
rhdr = FpSpread1.ActiveSheetView.RowHeader;
rhdr.ColumnCount = 3;                                              //  row header has three columns
rhdr.AutoText = FarPoint.Web.Spread.HeaderAutoText.Letters;        //  row header displays letters
rhdr.AutoTextIndex = 1;                                            //  automatic text in second zero-index row
Visual BasicCopy Code
Dim rhdr As FarPoint.Web.Spread.RowHeader
rhdr = FpSpread1.ActiveSheetView.RowHeader
rhdr.ColumnCount = 3                                              ' row header has three columns
rhdr.AutoText = FarPoint.Web.Spread.HeaderAutoText.Letters        ' row header displays letters
rhdr.AutoTextIndex = 1                                            ' automatic text in second zero-index row

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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