ComponentOne FlexPivot for WinForms
Task-Based Help / Adding Multiple Fields in Values List
In This Topic
    Adding Multiple Fields in Values List
    In This Topic

    FlexPivot provides the option for adding more than one value fields to the Values list. All you need to do is set MaxItems property to some numeric value in the code. This example uses the sample created in Configuring Fields in Code.

    1. Set the MaxItems property to 3 and add three value fields namely Extended Price, Discount and Freight to the ValueFields.Add() method as illustrated in the following code.
      'apply multiple value fields 
      fp.ValueFields.MaxItems = 3
      fp.ValueFields.Add("ExtendedPrice", "Discount", "Freight")
      
      //apply multiple value fields 
      fp.ValueFields.MaxItems = 3;
      fp.ValueFields.Add("ExtendedPrice", "Discount", "Freight");
      
    2. Press F5 to run the application and observe that Extended Price, Discount and Freight fields are displayed in the grid.

      multiplevaluefields