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
305
Rows not displaying properly in XamPivotGrid
posted

Hi,

I am using V10.3. For binding PivotGrid i am using FlatDataSource. Here my source is dynamic i.e. based on user selection.

So, for creating the IEnumerable for FlatDataSource's ItemsSource, i am using DynamicTypeBuilder provided by Infragistics.

The problem is that i am not able to see the Dimension in the Row area even though it's being seen in PivotDataSelector. And if i drag the dimension into the Row Area, it gets displayed in the PivotGrid.

In my final app, i don't want to use PivotDataSelector, as will be creating my own selection control.

I have included word doc as attachment.

If from the PivotDataSelector if i drag dimension "[Age Group].[Age in Years]" into row area, then i am able to see the row and it's corresponding value.

Kindly let me know where i am wrong in the code as soon as possible.

Thanks,
Sachin

Parents
  • 7922
    posted

    Hi

    The reason the dimention is not visible in rows area is the name of properties you create. Please remove the start and end brackets(“ []”) from name of properties and they will be displayed initially into rows area.

     

    If you want to change the name displayed into dimension box you can use next code

     

    CubeMetadata cubeMetadata = new CubeMetadata

    {

         DataTypeFullName = "ExcelData",

         DisplayName = "Sheet1 Data"

     };

     

    cubeMetadata.DimensionSettings.Add(new DimensionMetadata { SourcePropertyName = "Date", DisplayName = "Sales Dates", AutoGenerateField = true });

    flatDataSource.CubesSettings.Add(cubeMetadata);

     

    Regards

    Todor

     

Reply Children