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
315
WinPivotGrid - can modify caption for column or row
posted

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.

Parents
  • 7695
    Verified Answer
    Offline posted

    You would want to handle the Initialize Descriptor events.
    InitializeOlapAxisElementDescriptor to customize the Dimensions names
    InitializeHierarchyDescriptor to customize the "All " caption names
    InitializeMeaureDescriptor 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,

Reply Children
No Data