Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
XamPivotGrid Sort Measures
posted

Hi,

I have a XamPivotGrid that displays a OlapFlatDataSource.

            <igOlap:FlatDataSource 
                x:Key="OlapFlatDataSource"
                MeasureListLocation="Rows"
                ConnectionSettings="{StaticResource OlapFlatDataConnectionSettings}"
                Cube="KategorienZellen"
                Columns="[Datum].[Datum]"
                Rows="[Kategorie].[Kategorie]"
                Measures="Zellen"
                >
                <igOlap:FlatDataSource.CubesSettings>
                    <igOlap:CubeMetadata
                        DataTypeFullName="Dispo.KategorienZellen"
                        DisplayName="KategorienZellen"
                        >
                        <igOlap:DimensionMetadata
                            SourcePropertyName="Zellen"
                            DimensionType="Measure"
                            DisplayName="Zellen"
                            />
                        <igOlap:DimensionMetadata
                            SourcePropertyName="Kategorie"
                            DisplayName="Kategorie"
                            />
                    </igOlap:CubeMetadata>
                </igOlap:FlatDataSource.CubesSettings>
                <igOlap:FlatDataSource.HierarchyDescriptors>
                    <igOlap:HierarchyDescriptor
                        SourcePropertyName="Kategorie" 
                        HierarchyName="Kategorie"
                        >
                        <igOlap:HierarchyDescriptor.LevelDescriptors>
                            <igOlap:HierarchyLevelDescriptor
                                LevelName="LogischeGruppe" 
                                LevelExpressionPath="Kategorie.LogischeGruppe"
                                LevelDisplayName="LogischeGruppe"
                                
                                />
                            <igOlap:HierarchyLevelDescriptor
                                LevelName="HauptTyp" 
                                LevelExpressionPath="Kategorie.HauptTyp"
                                LevelDisplayName="HauptTyp"
                                />
                            <igOlap:HierarchyLevelDescriptor
                                LevelName="Typ" 
                                LevelExpressionPath="Kategorie.Typ"
                                LevelDisplayName="Typ"
                                />
                        </igOlap:HierarchyDescriptor.LevelDescriptors>
                    </igOlap:HierarchyDescriptor>
                    <igOlap:HierarchyDescriptor
                        SourcePropertyName="Datum" 
                        HierarchyName="Datum"
                        HierarchyDisplayName="Datum"
                        >
                        <igOlap:HierarchyDescriptor.LevelDescriptors>
                            <igOlap:HierarchyLevelDescriptor
                                LevelName="Woche"/>
                            <igOlap:HierarchyLevelDescriptor
                                LevelName="Tage" 
                                LevelExpressionPath="Datum" 
                                DisplayFormat="{}dddd"
                                LevelDisplayName="Tage"/>
                        </igOlap:HierarchyDescriptor.LevelDescriptors>
                    </igOlap:HierarchyDescriptor>
                </igOlap:FlatDataSource.HierarchyDescriptors>
            </igOlap:FlatDataSource>

<ig:XamPivotGrid 
            Grid.Row="2"
            x:Name="pivotGrid" 
            DataSource="{StaticResource OlapFlatDataSource}"
            ColumnSorting="pivotGrid_ColumnSorting"
            >
            <igCharts:XamPivotGrid.SortingSettings>
                <igCharts:PivotSortingSettings 
                    AllowSorting="True"
                    ShowSortIndicator="True"
                    />
            </igCharts:XamPivotGrid.SortingSettings>
        </ig:XamPivotGrid>

The XamPivotGrid displays the Data and shows the sortindicators but nothing happens if i click them. 

I just want the Measures to be able to sort and in code behind

this.pivotGrid.SelectionSettings.CellSelectionAction =
    PivotCellSelectionAction.SelectCell;
            this.pivotGrid.SelectedCellsCollectionChanged += (sender, e) =>
            {
                PivotDataColumn dataCol =
                    (e.NewSelectedItems.First().Column as PivotDataColumn); 
                dataCol.IsSorted = PivotSortDirection.Ascending;
            };

I'm able to do it.

I dont get what I'm missing.

Wrong:  Expected: