Spread Windows Forms 12.0 Product Documentation
SetColumnSortIndicator Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : SetColumnSortIndicator Method
Column index
SortIndicator enumeration setting
Sets the sort indicator for the specified column on this sheet.
Syntax
'Declaration
 
Public Sub SetColumnSortIndicator( _
   ByVal column As Integer, _
   ByVal order As SortIndicator _
) 
'Usage
 
Dim instance As SheetView
Dim column As Integer
Dim order As SortIndicator
 
instance.SetColumnSortIndicator(column, order)
public void SetColumnSortIndicator( 
   int column,
   SortIndicator order
)

Parameters

column
Column index
order
SortIndicator enumeration setting
Remarks

The SheetView.SetColumnShowSortIndicator method and the Column.ShowSortIndicator property set whether the column shows the sort indicator the next time that the SheetView.AutoSortColumns method is called for that column. It has no effect until AutoSortColumns is called for that column index.

If you want to change the sort indicator shown for a column, use the SheetView.SetColumnSortIndicator method or the Column.SortIndicator property. These change the sort indicator in the column header and do not affect whether the column is sorted or not.

Example
This example illustrates the use of this member by returning the sort indicator for the specified column header.
fpSpread1.ActiveSheet.SetColumnSortIndicator(0, FarPoint.Win.Spread.Model.SortIndicator.Descending); 
FarPoint.Win.Spread.Model.SortIndicator si;
si = fpSpread1.ActiveSheet.GetColumnSortIndicator(0);
listBox1.Items.Add(si.ToString());
FpSpread1.ActiveSheet.SetColumnSortIndicator(0, FarPoint.Win.Spread.Model.SortIndicator.Descending)
Dim si As FarPoint.Win.Spread.Model.SortIndicator
si = FpSpread1.ActiveSheet.GetColumnSortIndicator(0)
ListBox1.Items.Add(si.ToString())
See Also

Reference

SheetView Class
SheetView Members
AutoSortColumn Method
GetColumnSortIndicator Method
SetColumnShowSortIndicator Method
SortIndicator Property (in Column)

User-Task Documentation

Managing Sorting