Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Data Formatting
   [Expand]Layout
   [Expand]Appearance
   [Expand]Data Export
   [Expand]Design-Time Features
   [Expand]UI Elements
   [Collapse]Examples
    [Expand]Binding to Data
    [Collapse]Data Shaping
      How to: Add Custom Totals
      How to: Calculate Multiple Custom Totals with Custom Summary Type
      How to: Calculate Running Totals
      How to: Apply a Filter
      How to: Implement the Group Filter
      How to: Change the Prefilter's Criteria in Code
      How to: Display Underlying Records
      How to: Group Date-Time Values
      How to: Implement Custom Group Intervals
      How to: Implement Custom Summary
      How to: Sort Data by a Data Field
      How to: Sort Data by Individual Columns (Rows)
      How to: Sort Data by Individual Columns (Rows) in OLAP Mode
      How to: Sort Data in Server Mode Using Custom Sorting Algorithm
      How to: Sort Data by OLAP Member Properties
      How to: Prevent End-Users From Changing Filter Conditions
      How to: Replace Default Filter Items with Custom Ones
      How to: Add and Remove Items From Filter Drop-Down Lists
      How to: Sort Filter Drop-Down Items in a Custom Manner
      How to: Locate a Column (Row) Header By Its Column's (Row's) Summary Values
    [Expand]Data Analysis
    [Expand]Data Formatting
    [Expand]Layout
    [Expand]Appearance
    [Expand]Data Export
    [Expand]Miscellaneous
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Sort Data by Individual Columns (Rows) in OLAP Mode

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E3092.

The following example demonstrates how to implement Sorting by Summary in OLAP mode.

In this example, values of the Semester field are sorted by the Australia | Bendigo column summary values. To do this, two sort conditions represented by PivotGridFieldSortCondition instances are created. One of them represents an OLAP member that corresponds to the 'Australia' value, while another corresponds to the 'Bendigo' value. These sort conditions are added to the Semester field's PivotGridFieldSortBySummaryInfo.Conditions collection to specify the column by which Semester values should be sorted. A data field that identifies the column is specified via the PivotGridFieldSortBySummaryInfo.Field property.

OLAP members corresponding to the Australia and Bendigo values are obtained using the ASPxPivotGrid.GetFieldValueOLAPMember method. Note that OLAP members can be obtained only for visible field values. For this reason, the Australia field value is expanded before initializing OLAP members in order to obtain the Bendigo OLAP member.

This sample uses the Adventure Works 2008 cube.

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