Spread ASP.NET 6.0 Product Documentation
AllowSort Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : AllowSort Property


Glossary Item Box

Gets or sets whether users can sort rows in the sheet.

Syntax

Visual Basic (Declaration) 
Public Property AllowSort As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As Boolean
 
instance.AllowSort = value
 
value = instance.AllowSort
C# 
public bool AllowSort {get; set;}

Property Value

Boolean: true to allow users to sort rows; false otherwise

Remarks

When this property is set to true, users can double-click a column header cell to sort all the rows of a sheet according to the values in that column. Typically, a sort indicator displays in that header cell. For more information on the operation of sorting columns and rows in a sheet, refer to Customizing Sorting of Rows of User Data.

Example

This example allows the user to sort the sheet.
C#Copy Code
FarPoint.Web.Spread.SheetView sv = new FarPoint.Web.Spread.SheetView();
FpSpread1.ActiveSheetView.SetValue(0, 0, 9);
FpSpread1.ActiveSheetView.SetValue(1, 0, 5);
FpSpread1.ActiveSheetView.SetValue(2, 0, 7);
sv = FpSpread1.ActiveSheetView;
if (IsPostBack)
{
    sv.AllowSort = true;
}
Visual BasicCopy Code
Dim sv As FarPoint.Web.Spread.SheetView
FpSpread1.ActiveSheetView.SetValue(0, 0, 9)
FpSpread1.ActiveSheetView.SetValue(1, 0, 5)
FpSpread1.ActiveSheetView.SetValue(2, 0, 7)
sv = FpSpread1.ActiveSheetView
If IsPostBack Then
    sv.AllowSort = True
End If

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.