GrapeCity.Xaml.SpreadSheet.Data
SortInfo Constructor(Int32,Boolean)
Example 


The index of the column or row on which to sort.
If set to true, sort order is ascending.
Creates a SortInfo object with the specified order that uses the system default comparer for the comparison.
Syntax
'Declaration
 
Public Function New( _
   ByVal index As Integer, _
   ByVal ascending As Boolean _
)
'Usage
 
Dim index As Integer
Dim ascending As Boolean
 
Dim instance As New SortInfo(index, ascending)
public SortInfo( 
   int index,
   bool ascending
)

Parameters

index
The index of the column or row on which to sort.
ascending
If set to true, sort order is ascending.
Example
This example sorts a range.
for (int i = 0; i < 10; i++)
            {
                gcSpreadSheet1.Sheets[0].SetValue(i, 0, i);
            }

 private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            gcSpreadSheet1.Sheets[0].SortRange(0, 0, 10, 1, true, new GrapeCity.Xaml.SpreadSheet.Data.SortInfo[] { new GrapeCity.Xaml.SpreadSheet.Data.SortInfo(0, false) });            
        }
For i As Integer = 0 To 9
            GcSpreadSheet1.Sheets(0).SetValue(i, 0, i)
        Next

Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
        gcSpreadSheet1.Sheets(0).SortRange(0, 0, 10, 1, True, New GrapeCity.Xaml.SpreadSheet.Data.SortInfo() {New GrapeCity.Xaml.SpreadSheet.Data.SortInfo(0, False)})
    End Sub
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

SortInfo Class
SortInfo Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options