■ PivotGridControl 엘리먼트에서 그룹 필터를 적용하는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<dxpg:PivotGridControl x:Name="pivotGridControl" BestFitMode="AllRows"> <dxpg:PivotGridControl.Fields> <dxpg:PivotGridField FieldName="Extended Price" Area="DataArea" CellFormat="c0" /> <dxpg:PivotGridField FieldName="CategoryName" Area="RowArea" Caption="Product Category" /> <dxpg:PivotGridField FieldName="OrderDate" Area="ColumnArea" GroupInterval="DateYear" Caption="Year" /> <dxpg:PivotGridField FieldName="OrderDate" Area="ColumnArea" GroupInterval="DateMonth" Caption="Month" /> </dxpg:PivotGridControl.Fields> </dxpg:PivotGridControl> |
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
using DevExpress.Xpf.PivotGrid; ... PivotGridGroup pivotGridGroup = this.pivotGridControl.Groups.Add ( this.pivotGridControl.Fields[2], this.pivotGridControl.Fields[3] ); pivotGridGroup.FilterValues.BeginUpdate(); pivotGridGroup.FilterValues.FilterType = FieldFilterType.Included; pivotGridGroup.FilterValues.Values.Add(1994); pivotGridGroup.FilterValues.Values.Add(1995).ChildValues.Add(1); pivotGridGroup.FilterValues.EndUpdate(); |