[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Expand]Controls and Libraries
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Collapse]API Reference
  [Expand]DevExpress.Charts.Designer
  [Expand]DevExpress.Data
  [Expand]DevExpress.Mvvm.UI
  [Expand]DevExpress.Mvvm.UI.Interactivity
  [Expand]DevExpress.Mvvm.UI.ModuleInjection
  [Expand]DevExpress.Xpf.Accordion
  [Expand]DevExpress.Xpf.Bars
  [Expand]DevExpress.Xpf.Carousel
  [Expand]DevExpress.Xpf.Charts
  [Expand]DevExpress.Xpf.Charts.Localization
  [Expand]DevExpress.Xpf.Charts.RangeControlClient
  [Expand]DevExpress.Xpf.ChunkList
  [Expand]DevExpress.Xpf.Controls
  [Expand]DevExpress.Xpf.Core
  [Expand]DevExpress.Xpf.Core.ConditionalFormatting
  [Expand]DevExpress.Xpf.Core.DataSources
  [Expand]DevExpress.Xpf.Core.FilteringUI
  [Expand]DevExpress.Xpf.Core.Native
  [Expand]DevExpress.Xpf.Core.ServerMode
  [Expand]DevExpress.Xpf.Data
  [Expand]DevExpress.Xpf.DataAccess
  [Expand]DevExpress.Xpf.DataAccess.DataSourceWizard
  [Expand]DevExpress.Xpf.Diagram
  [Expand]DevExpress.Xpf.Dialogs
  [Expand]DevExpress.Xpf.Docking
  [Expand]DevExpress.Xpf.Docking.Base
  [Expand]DevExpress.Xpf.DocumentViewer
  [Expand]DevExpress.Xpf.DXBinding
  [Expand]DevExpress.Xpf.Editors
  [Expand]DevExpress.Xpf.Editors.DataPager
  [Expand]DevExpress.Xpf.Editors.DateNavigator
  [Expand]DevExpress.Xpf.Editors.ExpressionEditor
  [Expand]DevExpress.Xpf.Editors.ExpressionEditor.Native
  [Expand]DevExpress.Xpf.Editors.Filtering
  [Expand]DevExpress.Xpf.Editors.Flyout
  [Expand]DevExpress.Xpf.Editors.Flyout.Native
  [Expand]DevExpress.Xpf.Editors.Helpers
  [Expand]DevExpress.Xpf.Editors.Native
  [Expand]DevExpress.Xpf.Editors.Popups
  [Expand]DevExpress.Xpf.Editors.RangeControl
  [Expand]DevExpress.Xpf.Editors.Settings
  [Expand]DevExpress.Xpf.Editors.Validation
  [Expand]DevExpress.Xpf.ExpressionEditor
  [Expand]DevExpress.Xpf.Gantt
  [Expand]DevExpress.Xpf.Gauges
  [Expand]DevExpress.Xpf.Gauges.Localization
  [Expand]DevExpress.Xpf.Grid
  [Expand]DevExpress.Xpf.Grid.ConditionalFormatting
  [Expand]DevExpress.Xpf.Grid.LookUp
  [Expand]DevExpress.Xpf.Grid.TreeList
  [Expand]DevExpress.Xpf.Layout.Core
  [Expand]DevExpress.Xpf.LayoutControl
  [Expand]DevExpress.Xpf.Map
  [Expand]DevExpress.Xpf.NavBar
  [Expand]DevExpress.Xpf.Navigation
  [Expand]DevExpress.Xpf.PdfViewer
  [Collapse]DevExpress.Xpf.PivotGrid
    AllowHideFieldsType Enumeration
    AsyncCompletedHandler Delegate
   [Expand]AsyncOperationResult Class
   [Expand]CellElement Class
   [Expand]CellElementData Class
   [Expand]CellInfo Class
   [Expand]ColorScaleFormatCondition Class
    CopyCollapsedValuesMode Enumeration
    CopyMultiSelectionMode Enumeration
   [Expand]CustomPrefilterDisplayTextEventArgs Class
    CustomPrefilterDisplayTextEventHandler Delegate
   [Expand]CustomServerModeSortEventArgs Class
   [Expand]DataAreaElement Class
   [Expand]DataAreaElementData Class
   [Expand]DataBarFormatCondition Class
    DataFieldArea Enumeration
    DataHeadersDisplayMode Enumeration
    DataProcessingEngine Enumeration
   [Expand]DefaultMenuItemNames Class
   [Expand]EventArgsToCellInfoConverter Class
   [Expand]EventArgsToFieldValueInfoConverter Class
   [Expand]ExpressionConditionBase Class
    FieldAllowedAreas Enumeration
    FieldArea Enumeration
    FieldBestFitArea Enumeration
    FieldColumnTotalsLocation Enumeration
    FieldFilterType Enumeration
   [Expand]FieldFilterValues Class
    FieldGroupInterval Enumeration
    FieldListAllowedLayouts Enumeration
    FieldListArea Enumeration
   [Expand]FieldListControlBase Class
    FieldListLayout Enumeration
    FieldListOrientation Enumeration
    FieldListStyle Enumeration
    FieldOLAPFilterUsingWhereClause Enumeration
    FieldPropertyName Enumeration
    FieldRowTotalsLocation Enumeration
    FieldSortBySummaryOrder Enumeration
    FieldSortLocation Enumeration
    FieldSortMode Enumeration
    FieldSortOrder Enumeration
    FieldSummaryDisplayType Enumeration
    FieldSummaryType Enumeration
    FieldTopValueMode Enumeration
    FieldTopValueType Enumeration
    FieldTotalsVisibility Enumeration
    FieldUnboundColumnType Enumeration
    FieldUnboundExpressionMode Enumeration
   [Expand]FieldValueCell Class
   [Expand]FieldValueElement Class
   [Expand]FieldValueElementData Class
   [Expand]FieldValueInfo Class
    FieldValueType Enumeration
    FilterPopupMode Enumeration
   [Expand]FormatCondition Class
   [Expand]FormatConditionBase Class
   [Expand]FormatConditionCollection Class
   [Expand]FormatConditionCommandParameters Class
   [Expand]GroupChangedEventArgs Class
    GroupChangedEventHandler Delegate
    GroupChangeType Enumeration
    GroupFilterMode Enumeration
   [Expand]GroupFilterValue Class
   [Expand]GroupFilterValues Class
   [Expand]GroupFilterValuesCollection Class
   [Expand]IconSetFormatCondition Class
   [Expand]IndicatorFormatConditionBase Class
   [Expand]IThreadSafeField Interface
   [Expand]LightweightCellElement Class
   [Expand]LightweightFieldValueElement Class
    OlapDataProvider Enumeration
   [Expand]PivotBrushChangedEventArgs Class
    PivotBrushChangedEventHandler Delegate
    PivotBrushType Enumeration
   [Expand]PivotCellBaseEventArgs Class
   [Expand]PivotCellDisplayTextEventArgs Class
    PivotCellDisplayTextEventHandler Delegate
   [Expand]PivotCellEventArgs Class
    PivotCellEventHandler Delegate
   [Expand]PivotCellValueEventArgs Class
    PivotCellValueEventHandler Delegate
    PivotChartDataProvideMode Enumeration
    PivotChartDataProvidePriority Enumeration
   [Expand]PivotChartDataSourceRow Class
    PivotChartExportFieldValueMode Enumeration
    PivotChartFieldValuesProvideMode Enumeration
    PivotChartItemDataMember Enumeration
    PivotChartItemType Enumeration
   [Expand]PivotCustomCellAppearanceEventArgs Class
    PivotCustomCellAppearanceEventHandler Delegate
   [Expand]PivotCustomChartDataSourceDataEventArgs Class
    PivotCustomChartDataSourceDataEventHandler Delegate
   [Expand]PivotCustomChartDataSourceRowsEventArgs Class
    PivotCustomChartDataSourceRowsEventHandler Delegate
   [Expand]PivotCustomFieldDataEventArgs Class
    PivotCustomFieldDataEventHandler Delegate
   [Expand]PivotCustomFieldListSortEventArgs Class
   [Expand]PivotCustomFieldSortEventArgs Class
    PivotCustomFieldSortEventHandler Delegate
   [Expand]PivotCustomFieldValueCellsEventArgs Class
    PivotCustomFieldValueCellsEventHandler Delegate
   [Expand]PivotCustomFilterPopupItemsEventArgs Class
    PivotCustomFilterPopupItemsEventHandler Delegate
   [Expand]PivotCustomGroupIntervalEventArgs Class
    PivotCustomGroupIntervalEventHandler Delegate
   [Expand]PivotCustomSummaryEventArgs Class
    PivotCustomSummaryEventHandler Delegate
   [Expand]PivotCustomValueAppearanceEventArgs Class
    PivotCustomValueAppearanceEventHandler Delegate
    PivotDefaultMemberFields Enumeration
   [Expand]PivotDrillDownDataRow Class
   [Expand]PivotDrillDownDataSource Class
   [Expand]PivotExcelFieldListControl Class
   [Expand]PivotFieldAreaChangingEventArgs Class
    PivotFieldAreaChangingEventHandler Delegate
   [Expand]PivotFieldDisplayTextEventArgs Class
    PivotFieldDisplayTextEventHandler Delegate
   [Expand]PivotFieldEventArgs Class
    PivotFieldEventHandler Delegate
   [Expand]PivotFieldFilterChangingEventArgs Class
    PivotFieldFilterChangingEventHandler Delegate
   [Expand]PivotFieldListControl Class
   [Expand]PivotFieldPropertyChangedEventArgs Class
    PivotFieldPropertyChangedEventHandler Delegate
   [Expand]PivotFieldValueCancelEventArgs Class
    PivotFieldValueCancelEventHandler Delegate
   [Expand]PivotFieldValueEventArgs Class
    PivotFieldValueEventHandler Delegate
   [Expand]PivotFilterEditorEventArgs Class
    PivotFilterEditorEventHandler Delegate
   [Expand]PivotGridCellMenuInfo Class
   [Expand]PivotGridCommands Class
   [Expand]PivotGridControl Class
   [Expand]PivotGridCsvExportOptions Class
   [Expand]PivotGridCustomTotal Class
   [Expand]PivotGridCustomTotalCollection Class
   [Expand]PivotGridField Class
   [Expand]PivotGridFieldCollection Class
   [Expand]PivotGridFieldValueMenuInfo Class
   [Expand]PivotGridFilterPopupMenuInfo Class
   [Expand]PivotGridGroup Class
   [Expand]PivotGridGroupCollection Class
   [Expand]PivotGridHeaderMenuInfo Class
   [Expand]PivotGridHeadersAreaMenuInfo Class
   [Expand]PivotGridMenuInfo Class
    PivotGridMenuType Enumeration
   [Expand]PivotGridPopupMenu Class
   [Expand]PivotGridXlsExportOptions Class
   [Expand]PivotGridXlsxExportOptions Class
   [Expand]PivotGroupEventArgs Class
    PivotGroupEventHandler Delegate
    PivotKpiGraphic Enumeration
    PivotKpiType Enumeration
   [Expand]PivotLayoutAllowEventArgs Class
    PivotLayoutAllowEventHandler Delegate
   [Expand]PivotLayoutUpgradeEventArgs Class
    PivotLayoutUpgradeEventHandler Delegate
   [Expand]PivotOlapExceptionEventArgs Class
    PivotOlapExceptionEventHandler Delegate
   [Expand]PivotOlapKpiMeasures Class
   [Expand]PivotOlapKpiValue Class
   [Expand]PivotOlapMember Class
   [Expand]PivotPropertyChangedEventArgs Class
    PivotPropertyChangedEventHandler Delegate
   [Expand]PivotQueryExceptionEventArgs Class
    PivotQueryExceptionEventHandler Delegate
   [Expand]PivotSerializationOptions Class
   [Expand]PivotSummaryDataRow Class
   [Expand]PivotSummaryDataSource Class
   [Expand]PivotUnboundExpressionEditorEventArgs Class
    PivotUnboundExpressionEditorEventHandler Delegate
   [Expand]PopupMenuShowingEventArgs Class
    PopupMenuShowingEventHandler Delegate
    ScrollingMode Enumeration
    SelectMode Enumeration
    ShowPrefilterPanelMode Enumeration
   [Collapse]SortByCondition Class
     SortByCondition Members
    [Expand]SortByCondition Constructor
    [Expand]SortByCondition Properties
   [Expand]SortByConditionCollection Class
    StoreLayoutMode Enumeration
   [Expand]TopBottomRuleFormatCondition Class
    UnboundExpressionMode Enumeration
    UseLightweightTemplates Enumeration
    UserAction Enumeration
  [Expand]DevExpress.Xpf.PivotGrid.Printing
  [Expand]DevExpress.Xpf.Printing
  [Expand]DevExpress.Xpf.Printing.Parameters
  [Expand]DevExpress.Xpf.Printing.Parameters.Models
  [Expand]DevExpress.Xpf.Printing.PreviewControl
  [Expand]DevExpress.Xpf.Printing.PreviewControl.Bars
  [Expand]DevExpress.Xpf.Prism
  [Expand]DevExpress.Xpf.PropertyGrid
  [Expand]DevExpress.Xpf.Reports.UserDesigner
  [Expand]DevExpress.Xpf.Reports.UserDesigner.Extensions
  [Expand]DevExpress.Xpf.Reports.UserDesigner.Localization
  [Expand]DevExpress.Xpf.Reports.UserDesigner.ReportWizard
  [Expand]DevExpress.Xpf.Reports.UserDesigner.ReportWizard.Pages
  [Expand]DevExpress.Xpf.Ribbon
  [Expand]DevExpress.Xpf.RichEdit
  [Expand]DevExpress.Xpf.RichEdit.Menu
  [Expand]DevExpress.Xpf.Scheduler
  [Expand]DevExpress.Xpf.Scheduler.Drawing
  [Expand]DevExpress.Xpf.Scheduler.Menu
  [Expand]DevExpress.Xpf.Scheduler.Reporting
  [Expand]DevExpress.Xpf.Scheduler.UI
  [Expand]DevExpress.Xpf.Scheduling
  [Expand]DevExpress.Xpf.Scheduling.Common
  [Expand]DevExpress.Xpf.Scheduling.Editors
  [Expand]DevExpress.Xpf.Scheduling.iCalendar
  [Expand]DevExpress.Xpf.Scheduling.Reporting
  [Expand]DevExpress.Xpf.Scheduling.Visual
  [Expand]DevExpress.Xpf.Scheduling.VisualData
  [Expand]DevExpress.Xpf.SpellChecker
  [Expand]DevExpress.Xpf.Spreadsheet
  [Expand]DevExpress.Xpf.Spreadsheet.Menu
  [Expand]DevExpress.Xpf.TreeMap
  [Expand]DevExpress.Xpf.Utils.Themes
  [Expand]DevExpress.Xpf.WindowsUI
  [Expand]DevExpress.Xpf.WindowsUI.Internal
  [Expand]DevExpress.Xpf.WindowsUI.Navigation
  [Expand]DevExpress.XtraRichEdit
  [Expand]DevExpress.XtraRichEdit.Printing
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

SortByCondition Class

Represents a sort condition used to identify the column/row by whose values the other field values will be sorted.

Namespace:DevExpress.Xpf.PivotGrid
Assembly:DevExpress.Xpf.PivotGrid.v19.1.dll

Expanded Syntax

Expanded Remarks

To identify the column/row by whose values their values will be sorted, pivot grid fields hold the PivotGridField.SortByConditions collection, which contains the SortByCondition objects.

A sort condition represents a field value. The PivotGridField.SortByConditions collection contains one sort condition for each field in the current Header Area. Together, these conditions identify the required column/row. For instance, the highlighted column on the image below is identified by three sort conditions.

The field value which the sort condition represents is specified by the Value property. The field to which the value belongs is specified by the Field property.

If the pivot grid is bound to an OLAP data source, the field value is identified by the corresponding OLAP member's unique name (OlapUniqueMemberName). In this instance, the Value property is set to null.

Expanded Example

The following example demonstrates how to sort data by a particular column.

In this example, values of the Product Name field are sorted by September 1994 column summary values. To do this, two sort conditions represented by SortByCondition instances are created. One of them identifies the '1994' field value, while another identifies the 'September' value. These sort conditions are added to the Product Name field's PivotGridField.SortByConditions collection to specify the column by which Product Name values should be sorted. A data field that identifies the column is specified via the PivotGridField.SortByField property.

Expanded Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
       System.Windows.DependencyObject
          System.Windows.ContentElement
             System.Windows.FrameworkContentElement
                DXFrameworkContentElement
                   SortByCondition

Expanded See Also

Is this topic helpful?​​​​​​​