I use FlatDataSource to bind data to WinPivotGrid.
I would like to set caption for column attributes (now it is the same with the name of colums from datasource)
Please help.
You would want to handle the Initialize Descriptor events. InitializeOlapAxisElementDescriptor to customize the Dimensions namesInitializeHierarchyDescriptor to customize the "All " caption namesInitializeMeaureDescriptor to customize the Measures settings, including how it aggregates and format strings
There is demostrations of the Hierarchy and Measure customizations in the samples browser, with a code snippet available here:https://es.infragistics.com/samples/windows-forms/pivot-grid/pivot-grid-binding-to-flat-data
With the OlapAxisElement customization example is here:
private void Ds_InitializeOlapAxisElementDescriptor(object sender, InitializeOlapAxisElementDescriptorEventArgs e){ switch (e.OlapElementDescriptor.Name) { case "Nation": e.OlapElementDescriptor.Caption = "XXXX"; break; default: break; }
}
Let me know if that helps,
Thank you. It Works.