GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class : SortRange Method |
true
to sort by rows; false to sort by columns.
'Declaration Public Function SortRange( _ ByVal row As System.Integer, _ ByVal column As System.Integer, _ ByVal rowCount As System.Integer, _ ByVal columnCount As System.Integer, _ ByVal byRows As System.Boolean, _ ByVal sortInfo() As SortInfo _ ) As System.Boolean
'Usage Dim instance As Worksheet Dim row As System.Integer Dim column As System.Integer Dim rowCount As System.Integer Dim columnCount As System.Integer Dim byRows As System.Boolean Dim sortInfo() As SortInfo Dim value As System.Boolean value = instance.SortRange(row, column, rowCount, columnCount, byRows, sortInfo)
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(object sender, RoutedEventArgs e) { gcSpreadSheet1.Sheets[0].SortRange(0, 0, 10, 1, true, new SortInfo[] { new SortInfo(0, false) }); gcSpreadSheet1.Invalidate(); }
For i As Integer = 0 To 9 GcSpreadSheet1.Sheets(0).SetValue(i, 0, i) Next Private Sub Button_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) GcSpreadSheet1.Sheets(0).SortRange(0, 0, 10, 1, True, New SortInfo() {New SortInfo(0, False)}) GcSpreadSheet1.Invalidate() End Sub
Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6