Hi
1) Is it possible to change "measure" label? (see screenshot below)
2) Is it possible to hide some of dimensions (for example "City")?
Hi,
Can you please look at this sample and say if it is applicable for you.
Regards,
M. Yovchev
Hi Plamen Pilev,
Please help me achieving the below given possibilities with Pivot Data Selector
I would like to hide a field - Unit sold, which is of measure type from the list of Dimensions as underlined in attached image. But want it to show in Measures.
I have read the post as mentioned if we hide from dimensions it will be hidden from measures as well. But my requirement is i want to hide is from dimension but not measure.
And lets say, if somehow i have hided the field from dimensions. Is there any possible way that i load the field as a default column to xam pivot grid.
Which means the xam data selector doesnt show the field name in the dimension list but the column is default loaded to xam pivot grid, Can we achieve this
Request you to please help with this issue asap.
Thanks,
Pratik
Thank you
Yes, it’s possible. The other option is to add cube and dimensions metadata:
FlatDataConnectionSettings flatDataSettings = new FlatDataConnectionSettings();
FlatDataSource flatDataSource = new FlatDataSource
{
Cube = DataSourceBase.GenerateInitialCube(typeof(ProductData).Name),
Rows = XmlaDataSource.GenerateInitialItems("[Region]"),
ConnectionSettings = flatDataSettings
};
CubeMetadata cubeMetadata =
new CubeMetadata
DataTypeFullName = typeof(ProductData).FullName,
DisplayName = "[Cube display name here]"
cubeMetadata.DimensionSettings.Add(
new DimensionMetadata
SourcePropertyName = "City",
AutoGenerateField = false
});
flatDataSource.CubesSettings.Add(cubeMetadata);
// setting items source here will build the tree of selector using the metadata
// so it’s important to keep this order of setting the props and adding the metadata
flatDataSettings.ItemsSource = items;
this.pivotGrid.DataSource = flatDataSource;
this.dataSelector.DataSource = flatDataSource;
or within XAML
<!-- Overriding the default meta attributes -->
<FlatData:FlatDataSource.CubesSettings>
<FlatData:CubeMetadata DataTypeFullName="XamPivotGridSample.ProductData" DisplayName="Products Data">
<FlatData:DimensionMetadata SourcePropertyName="City" AutoGenerateField="False"/>
</FlatData:CubeMetadata>
</FlatData:FlatDataSource.CubesSettings>
I hope that will cover your needs.
About “Measures” label I’m afraid that you cannot change it.Best regards.
Plamen.
Yes, I use FlatDataSource created in c#. Is it possible to do this without modifying model classes?