Spread for ASP.NET 9.0 Product Documentation
SortIndicator Property
Example 


Gets or sets the sort indicator for this column.
Syntax
'Declaration
 
Public Property SortIndicator As SortIndicator
'Usage
 
Dim instance As Column
Dim value As SortIndicator
 
instance.SortIndicator = value
 
value = instance.SortIndicator
public SortIndicator SortIndicator {get; set;}

Property Value

SortIndicator setting
Remarks

The sort indicator appears after the data is sorted and appears only in the column by which the data is sorted.

Example
This example creates a Column object for the default active spreadsheet, sets text in the first three rows of the column and in a button click event sorts the data in the column. The sort indicator for the column is displayed after the column is sorted.
private void Page_Load(object sender,System.EventArgs e)
{
if(this.IsPostBack)return;

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

private void Button1_Click(object sender,System.EventArgs e)
{
FpSpread1.ActiveSheetView.SortRows(1, true, true);
}
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (Me.IsPostBack) Then Return
        Dim mycol As FarPoint.Web.Spread.Column
        mycol = FpSpread1.ActiveSheetView.Columns(1)
        FpSpread1.ActiveSheetView.SetValue(0, 1, "Alignment")
        FpSpread1.ActiveSheetView.SetValue(1, 1, "CarbAdjust")
        FpSpread1.ActiveSheetView.SetValue(2, 1, "Brakes")
        mycol.SortIndicator = FarPoint.Web.Spread.Model.SortIndicator.Descending        
        FpSpread1.Sheets(0).AllowSort = True
    End Sub

Private Sub Button1_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 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

Column Class
Column Members

 

 


Copyright © GrapeCity, inc. All rights reserved.