/
MainWindow.xaml
44 lines (42 loc) · 2.66 KB
/
MainWindow.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<dx:ThemedWindow x:Class="DXPivotGrid_CustomSummary.MainWindow" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DXPivotGrid_CustomSummary"
xmlns:dxpg="http://schemas.devexpress.com/winfx/2008/xaml/pivotgrid">
<Grid>
<dxpg:PivotGridControl Loaded="PivotGridControl1_Loaded" Name="pivotGridControl1"
DataProcessingEngine="Optimized">
<dxpg:PivotGridControl.Fields>
<dxpg:PivotGridField Name="fieldCategoryName" Area="RowArea" AreaIndex="0" Caption="Category Name">
<dxpg:PivotGridField.DataBinding>
<dxpg:DataSourceColumnBinding ColumnName="CategoryName"/>
</dxpg:PivotGridField.DataBinding>
</dxpg:PivotGridField>
<dxpg:PivotGridField Name="fieldProductName" Area="RowArea" AreaIndex="1" Caption="Product Name">
<dxpg:PivotGridField.DataBinding>
<dxpg:DataSourceColumnBinding ColumnName="ProductName"/>
</dxpg:PivotGridField.DataBinding>
</dxpg:PivotGridField>
<dxpg:PivotGridField Name="fieldOrderDate" Area="ColumnArea" AreaIndex="0" Caption="OrderDate">
<dxpg:PivotGridField.DataBinding>
<dxpg:DataSourceColumnBinding ColumnName="OrderDate" GroupInterval="DateYear"/>
</dxpg:PivotGridField.DataBinding>
</dxpg:PivotGridField>
<dxpg:PivotGridField Name="fieldQuantity" Area="DataArea" AreaIndex="0" Caption="Quantity">
<dxpg:PivotGridField.DataBinding>
<dxpg:DataSourceColumnBinding ColumnName="Quantity" />
</dxpg:PivotGridField.DataBinding>
</dxpg:PivotGridField>
<dxpg:PivotGridField Name="fieldQuantityDistinctCount" Area="DataArea" AreaIndex="1"
Caption="Count Distinct">
<dxpg:PivotGridField.DataBinding>
<dxpg:ExpressionDataBinding Expression="DistinctCount([OrderID])"/>
</dxpg:PivotGridField.DataBinding>
</dxpg:PivotGridField>
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
</Grid>
</dx:ThemedWindow>