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
150
Change resource and field label
posted

Hello,

I have two issues about XamPivotGrid.

First:
I already set a resource for my component, but I can't find the string for some labels. It's red marks in the screenshot.

I translated the file "InfragisticsWPF4.Controls.Grids.XamPivotGrid.v14.1.resx" and registered using the code below:

Infragistics.Controls.Grids.XamPivotGrid.RegisterResources("IC.Properties.Resources", typeof(icPivotGrid).Assembly);

Second:
I can't change the field's label, it's green marks in the screenshot.
I am using the code below:

outputFlatDataSource = new FlatDataSource();
outputFlatDataSource.ItemsSource = List;
outputFlatDataSource.Cube = DataSourceBase.GenerateInitialCube(nomeClasseDinamica);

CubeMetadata cubeMetadata = new CubeMetadata();
cubeMetadata.DisplayName = "Dados";
cubeMetadata.DataTypeFullName = typeBuilder.DynamicAssemblyName + "." + typeBuilder.DynamicTypeName;
foreach (InternalPivotColumn item in _colunasPivot)
{
cubeMetadata.DimensionSettings.Add(new DimensionMetadata()
{
SourcePropertyName = item.NomeColuna,
DisplayName = item.Rotulo
});
}
outputFlatDataSource.CubesSettings.Add(cubeMetadata);

Thanks..

Parents
  • 34510
    Offline posted

    Hi Eduardo,

    You will need to also translate InfragisticsWPF4.Olap.FlatData.v14.1.resx and InfragisticsWPF4.Olap.v14.1.resx.  The "All Periods" text in the pivot grid is from the FlatData resx file, and the "Measures" text is from the Olap resx file.

    As for the dimension metadata, that is how you change the text in the pivot data selector tree for all of your dimensions.  As you can see in my sample, I can change the text of my Product dimension by doing this.  Not really sure why it's not working in yours.  Are you sure the values inside item.NomeColuna and item.Rotulo are correct?

    PivotGridMetadata.zip
Reply Children
No Data