Spread for ASP.NET 7.0 Product Documentation
GetColumnSortIndicator Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : GetColumnSortIndicator Method


column
Column index

Glossary Item Box

Gets the sort indicator to display at the specified column.

Syntax

Visual Basic (Declaration) 
Public Function GetColumnSortIndicator( _
   ByVal column As Integer _
) As SortIndicator
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim column As Integer
Dim value As SortIndicator
 
value = instance.GetColumnSortIndicator(column)
C# 
public SortIndicator GetColumnSortIndicator( 
   int column
)

Parameters

column
Column index

Return Value

SortIndicator setting that determines how the sort indicator is displayed

Example

This example creates a SheetView object and a Column object. Values are inserted into the second column and in a button click event the column data is sorted and the sort indicator appears. The type of indicator to display is returned to a list box using the SheetView object.
C#Copy Code
private void Page_Load(object sender,System.EventArgs e)
{
if(this.IsPostBack)return;

FarPoint.Web.Spread.Column mycol;
FarPoint.Web.Spread.SheetView sv=FpSpread1.ActiveSheetView;
mycol=sv.Columns[1];
sv.SetValue(0,1,"Alignment");
sv.SetValue(1,1,"CarbAdjust");
sv.SetValue(2,1,"Brakes");
sv.AllowSort=true;
mycol.SortIndicator=FarPoint.Web.Spread.Model.SortIndicator.Descending;
}

private void Button1_Click(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.SortRows(1,true,true);
}
Visual BasicCopy Code
Private Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load

If(Me.IsPostBack)Then Return

Dim sv As FarPoint.Web.Spread.SheetView
sv=FpSpread1.ActiveSheetView
Dim mycol A sFarPoint.Web.Spread.Column
mycol=sv.Columns(1)
sv.SetValue(0,1,"Alignment")
sv.SetValue(1,1,"CarbAdjust")
sv.SetValue(2,1,"Brakes")
sv.AllowSort=True
mycol.SortIndicator=FarPoint.Web.Spread.Model.SortIndicator.Descending
ListBox1.Items.Add(sv.GetColumnSortIndicator(1))
End Sub

Private SubButton1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles Button1.Click
FpSpread1.ActiveSheetView.SortRows(1,True,True)
End Sub

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.