Spread for ASP.NET 11 Product Documentation
AutoTextIndex Property (RowHeader)
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > RowHeader Class : AutoTextIndex Property
Gets or sets which row header column displays the automatic text when there are multiple row header columns.
Syntax
'Declaration
 
Public Property AutoTextIndex As Integer
'Usage
 
Dim instance As RowHeader
Dim value As Integer
 
instance.AutoTextIndex = value
 
value = instance.AutoTextIndex
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.
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
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
See Also

Reference

RowHeader Class
RowHeader Members
AutoText Property
Visible Property
ColumnCount Property
ColumnHeader.AutoTextIndex Property

User-Task Documentation

Customizing the Appearance of Headers