GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class : SortRange Method |
true
to sort by rows; false to sort by columns.
'Declaration Public Function SortRange( _ ByVal row As Integer, _ ByVal column As Integer, _ ByVal rowCount As Integer, _ ByVal columnCount As Integer, _ ByVal byRows As Boolean, _ ByVal sortInfo() As SortInfo _ ) As Boolean
true
to sort by rows; false to sort by columns.true
if the data is successfully sorted; otherwise, false
.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
Target Platforms: Windows Server 2012, Windows RT