Spread ASP.NET 6.0 Product Documentation
GetColumnSortIndicator Method
See Also  Example Send Feedback
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
PrivatevoidPage_Load(objectsender,System.EventArgse)
{
If(this.IsPostBack)Return;

FarPoint.Web.Spread.Columnmycol;
FarPoint.Web.Spread.SheetViewsv=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;
}

PrivatevoidButton1_Click(objectsender,System.EventArgse)
{
FpSpread1.ActiveSheetView.SortRows(1,True,True);
}
Visual BasicCopy Code
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load

If(Me.IsPostBack)ThenReturn

DimsvAsFarPoint.Web.Spread.SheetView
sv=FpSpread1.ActiveSheetView
DimmycolAsFarPoint.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))

EndSub

PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click
FpSpread1.ActiveSheetView.SortRows(1,True,True)
EndSub

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.