Spread ASP.NET 15
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / SortInfo Class / Ascending Property
Example


In This Topic
    Ascending Property (SortInfo)
    In This Topic
    Gets or sets whether the sort order is ascending.
    Syntax
    'Declaration
     
    Public Property Ascending As Boolean
    'Usage
     
    Dim instance As SortInfo
    Dim value As Boolean
     
    instance.Ascending = value
     
    value = instance.Ascending
    public bool Ascending {get; set;}

    Property Value

    Boolean: true for ascending order of sorting; false for descending
    Example
    This example sorts the columns using the sort array.
    FarPoint.Web.Spread.SortInfo si0 = new FarPoint.Web.Spread.SortInfo(0, true, System.Collections.Comparer.Default);
    FarPoint.Web.Spread.SortInfo si1 = new FarPoint.Web.Spread.SortInfo(1, true); FarPoint.Web.Spread.SortInfo si2 = new FarPoint.Web.Spread.SortInfo(2,
    true);
    
    si1.Ascending = false;
    si1.Index = 1;
    si1.Comparer = System.Collections.Comparer.Default;
    
    FpSpread1.ActiveSheetView.SetValue(0, 0, "D"); FpSpread1.ActiveSheetView.SetValue(1, 0, "F"); FpSpread1.ActiveSheetView.SetValue(2,
    0, "E");
    
    FpSpread1.ActiveSheetView.SetValue(0, 1, "A"); FpSpread1.ActiveSheetView.SetValue(1, 1, "C"); FpSpread1.ActiveSheetView.SetValue(2,
    1, "B");
    
    FpSpread1.ActiveSheetView.SetValue(0, 2, "G"); FpSpread1.ActiveSheetView.SetValue(1, 2, "I"); FpSpread1.ActiveSheetView.SetValue(2,
    2, "H");
    
    FarPoint.Web.Spread.SortInfo[] si = new FarPoint.Web.Spread.SortInfo[] {si0, si1, si2}; FpSpread1.ActiveSheetView.SortColumns(0,
    3, si); 
     
    
    Dim si0 As New FarPoint.Web.Spread.SortInfo(0, True,
    System.Collections.Comparer.Default)
    Dim si1 As New FarPoint.Web.Spread.SortInfo(1, True)
    Dim si2 As New FarPoint.Web.Spread.SortInfo(2, True)
    
    si1.Ascending = False
    si1.Index = 1
    si1.Comparer = System.Collections.Comparer.Default
    
    FpSpread1.ActiveSheetView.SetValue(0, 0, "D") FpSpread1.ActiveSheetView.SetValue(1, 0, "F") FpSpread1.ActiveSheetView.SetValue(2,
    0, "E")
    
    FpSpread1.ActiveSheetView.SetValue(0, 1, "A") FpSpread1.ActiveSheetView.SetValue(1, 1, "C") FpSpread1.ActiveSheetView.SetValue(2,
    1, "B")
    
    FpSpread1.ActiveSheetView.SetValue(0, 2, "G") FpSpread1.ActiveSheetView.SetValue(1, 2, "I") FpSpread1.ActiveSheetView.SetValue(2,
    2, "H")
    
    Dim si() As FarPoint.Web.Spread.SortInfo = New
    FarPoint.Web.Spread.SortInfo() {si0, si1, si2} FpSpread1.ActiveSheetView.SortColumns(0, 3, si) 
    See Also