Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ColumnView.StartSorting Event

Fires before a sorting operation is started.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

#Declaration

[DXCategory("Sorting")]
public event EventHandler StartSorting

#Event Data

The StartSorting event's data class is EventArgs.

#Remarks

When sorting data by values of a column, the View does the following:

  1. raises the StartSorting event;
  2. sorts data;
  3. raises the ColumnView.EndSorting event.

Note that data grouping requires sorting to be performed. Thus, the StartSorting and ColumnView.EndSorting events are also raised before and after grouping data. Note that you can suppress these events while performing sequential sorting and grouping operations. Use the ColumnView.BeginSort and ColumnView.EndSort methods for this purpose.

Note

The ColumnView.StartSorting and ColumnView.EndSorting events are not raised, when changing the data while the View is already sorted. In this case, the modified row may move to another position due to the current sort rules without firing these events.

See the Sorting in Code document for more information.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the StartSorting event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also