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


index
Row or column index
value
Sort indicator value

Glossary Item Box

Sets the sort indicator for the specified row or column. (This implementation does nothing.)

Syntax

Visual Basic (Declaration) 
Public Overridable Sub SetSortIndicator( _
   ByVal index As Integer, _
   ByVal value As SortIndicator _
) 
Visual Basic (Usage)Copy Code
Dim instance As BaseSheetAxisModel
Dim index As Integer
Dim value As SortIndicator
 
instance.SetSortIndicator(index, value)
C# 
public virtual void SetSortIndicator( 
   int index,
   SortIndicator value
)

Parameters

index
Row or column index
value
Sort indicator value

Example

This example returns the sort indicator for the specified column.
C#Copy Code
DataTable tblMain = new DataTable();
int i;
tblMain = new DataTable();
tblMain.Columns.Add("ColA");
tblMain.Columns.Add("ColB");
for (i = 1; i <=99; i++)
{
   DataRow r = tblMain.NewRow();
   r[0] = "A " + i.ToString();
   r[1] = "B " + i.ToString();
   tblMain.Rows.Add(r);
}
FpSpread1.DataSource = tblMain;
FpSpread1.ActiveSheetView.AllowSort = true;
 
FarPoint.Web.Spread.Model.BaseSheetAxisModel b;
FarPoint.Web.Spread.Model.SortIndicator si;
b = (FarPoint.Web.Spread.Model.BaseSheetAxisModel)FpSpread1.ActiveSheetView.ColumnAxisModel;
b.SetSortIndicator(0, FarPoint.Web.Spread.Model.SortIndicator.Descending);
si = b.GetSortIndicator(0);
Response.Write(si.ToString());
Visual BasicCopy Code
Dim tblMain As New DataTable
Dim i As Integer
tblMain = New DataTable
tblMain.Columns.Add("ColA")
tblMain.Columns.Add("ColB")
For i = 1 To 99
   Dim r As DataRow = tblMain.NewRow()
   r(0) = "A " + i.ToString()
   r(1) = "B " + i.ToString()
   tblMain.Rows.Add(r)
Next i
FpSpread1.DataSource = tblMain
FpSpread1.ActiveSheetView.AllowSort = True

Dim b As FarPoint.Web.Spread.Model.BaseSheetAxisModel
Dim si As FarPoint.Web.Spread.Model.SortIndicator
b = FpSpread1.ActiveSheetView.ColumnAxisModel
b.SetSortIndicator(0, FarPoint.Web.Spread.Model.SortIndicator.Descending)
si = b.GetSortIndicator(0)
Response.Write(si.ToString()) 

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.