Spread Windows Forms 12.0 Product Documentation
Sorting Event

FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : Sorting Event
Occurs when spread is sorting.
Public Event Sorting As SortingEventHandler
Dim instance As FpSpread
Dim handler As SortingEventHandler
AddHandler instance.Sorting, handler
public event SortingEventHandler Sorting
Event Data

The event handler receives an argument of type SortingEventArgs containing data related to this event. The following SortingEventArgs properties provide information specific to this event.

Gets whether to sort by rows (or columns).  
Gets or sets whether to cancel the default processing of sorting.  
Gets the index of the starting column of the block of cells to sort.  
Gets the number of columns in the block of cells to sort.  
Gets the index of the starting row of the block of cells to sort.  
Gets the number of rows in the block of cells to sort.  
Gets the Sheet (SheetView object) to be sorted.  
Gets the SortArgs objects that contain sort criteria and information about how to perform the sort.  
Gets the SortingMode setting that specifies the sorting behavior.  
This example uses the Sorting event.
fpSpread1.ActiveSheet.Columns[1].AllowAutoSort = true;
fpSpread1.ActiveSheet.Columns[1].AllowAutoFilter = true;
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu;
fpSpread1.ActiveSheet.AutoSortEnhancedContextMenu = true;
fpSpread1.ActiveSheet.AutoSortEnhancedMode = FarPoint.Win.Spread.SortingMode.RangeSorting;

private void fpSpread1_Sorted(object sender, FarPoint.Win.Spread.SortedEventArgs e)

        private void fpSpread1_Sorting(object sender, FarPoint.Win.Spread.SortingEventArgs e)
FpSpread1.ActiveSheet.Columns(1).AllowAutoSort = True
FpSpread1.ActiveSheet.Columns(1).AllowAutoFilter = True
FpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu
FpSpread1.ActiveSheet.AutoSortEnhancedContextMenu = True
FpSpread1.ActiveSheet.AutoSortEnhancedMode = FarPoint.Win.Spread.SortingMode.RangeSorting

Private Sub FpSpread1_Sorted(sender As Object, e As FarPoint.Win.Spread.SortedEventArgs) Handles FpSpread1.Sorted
    End Sub

    Private Sub FpSpread1_Sorting(sender As Object, e As FarPoint.Win.Spread.SortingEventArgs) Handles FpSpread1.Sorting
    End Sub
See Also