Spread for ASP.NET 7.0 Product Documentation
SortColumns(Int32,Boolean) Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class > SortColumns Method : SortColumns(Int32,Boolean) Method


keyRow
Row whose values are compared during sorting
ascending
Whether the sort is ascending

Glossary Item Box

Sorts all the columns in the sheet according to the specified parameters.

Syntax

Visual Basic (Declaration) 
Public Overloads Function SortColumns( _
   ByVal keyRow As Integer, _
   ByVal ascending As Boolean _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim keyRow As Integer
Dim ascending As Boolean
Dim value As Boolean
 
value = instance.SortColumns(keyRow, ascending)
C# 
public bool SortColumns( 
   int keyRow,
   bool ascending
)

Parameters

keyRow
Row whose values are compared during sorting
ascending
Whether the sort is ascending

Return Value

true if successful; otherwise false

Remarks

This is the simplest of the methods to sort columns. You need only specify the row to use as a key for sorting and whether the sort is ascending or descending. All the columns in the sheet are sorted.

Example

This example illustrates the use of this member by sorting the columns with the specified parameters.
C#Copy Code
FarPoint.Web.Spread.SheetView sv;
FarPoint.Web.Spread.SortInfo[] s = new FarPoint.Web.Spread.SortInfo[1];
s[0] = new FarPoint.Web.Spread.SortInfo(0, false);
sv = FpSpread1.ActiveSheetView;
sv.SortColumns(0, false);
Visual BasicCopy Code
Dim sv As FarPoint.Web.Spread.SheetView
Dim s(1) As FarPoint.Web.Spread.SortInfo
s(0) = New FarPoint.Web.Spread.SortInfo(0, False)
sv = FpSpread1.ActiveSheetView
sv.SortColumns(0, False)

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.