The following example demonstrates how to implement sorting by summary in OLAP mode. In this example, values of the Fiscal Year field are sorted by the Australia | Bendigo column summary values.
Two PivotGridFieldSortCondition
objects contain OLAP members that correspond to Australia
and Bendigo
values. The PivotGridControl.GetFieldValueOLAPMember
methods obtain these values. Obtained values specify columns by which the Fiscal Year field should be sorted and are stored in the Fiscal Year's PivotGridFieldBase.SortBySummaryInfo.Conditions
collection. OLAP members can be obtained only for visible field values. For this reason, the Australia field value is expanded before initializing OLAP members to obtain the Bendigo member. The PivotGridFieldBase.SortBySummaryInfo.Field
property specifies the data field whose summary values should be used to sort values of the Fiscal Year field.
Pivot Grid for WinForms - Apply Summary Filter
(you will be redirected to DevExpress.com to submit your response)