Visual Basic (Declaration) | |
---|---|
Public Property AutoSortIndex As Integer |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As ColumnHeader Dim value As Integer instance.AutoSortIndex = value value = instance.AutoSortIndex |
C# | |
---|---|
public int AutoSortIndex {get; set;} |
Property Value
Integer row index of the row in which to display the sort indicatorIf your header has multiple column header rows, you can specify which row displays the sort indicator by setting this property. To specify the index, set the property to a value between 0 and n-1, where 0 is the top row and n is the number of header rows. Any value above n-1 simply puts the sort indicator in the bottom row.
If you set this property to specify a row to display the sorting indicator, for example, header row 3, and then later change the number of column header rows to be less than 3, the sort indicator is displayed in the bottom row, as if the RowCount property is set to -1. However, if you then change the number of header rows to 3 or greater, the sort indicator is again displayed in header row 3. Use the RowCount property to specify how many column header rows the component displays.
You can allow users to sort data by clicking a column header using the Column.AllowAutoSort property (or SheetView.AutoSortColumn property) to specify the type of sorting and whether to display the sort indicator.
This property does not have an effect unless the Visible property (or the SheetView.ColumnHeaderVisible property) is set to true, the column header that displays the sort indicator is not hidden, and the Column.AllowAutoSort property (or SheetView.AutoSortColumn property) is set to true.
C# | Copy Code |
---|---|
FarPoint.Win.Spread.ColumnHeader ch;
ch = fpSpread1.ActiveSheet.ColumnHeader;
ch.RowCount = 3;
ch.AutoSortIndex = 2;
fpSpread1.ActiveSheet.Columns[-1].AllowAutoSort = true; |
Visual Basic | Copy Code |
---|---|
Dim ch As FarPoint.Win.Spread.ColumnHeader ch = FpSpread1.ActiveSheet.ColumnHeader ch.RowCount = 3 ch.AutoSortIndex = 2 FpSpread1.ActiveSheet.Columns(-1).AllowAutoSort = True |
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8
Reference
ColumnHeader ClassColumnHeader Members