Spread ASP.NET 18
Spread for ASP.NET 18 Product Documentation / Developer's Guide / Customizing User Interaction / Customizing Sorting of Rows of User Data / Allowing User Sorting
In This Topic
    Allowing User Sorting
    In This Topic

    You can allow the user to sort with the AllowSort property. The following image shows the column after the user has double-clicked on the header.

    User Sorting

    Using Code

    Use the AllowSort property to allow user sorting.

    Example

    The following example sets the AllowSort property.

    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);
    sv.AllowSort = true; 
    
    VB
    Copy 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
    sv.AllowSort = True 
    

    Using the Spread Designer

    1. Select the Settings menu in the Sheet Settings section.
    2. Select the General icon.
    3. Set the AllowSort check box.
    4. Click OK to close the dialog.
    5. Click Apply and Exit to close the Spread Designer.