Reprents A collection of all the PivotField objects in a PivotTable report.
For a list of all members of this type, see PivotFields Members.
System.Object
Aspose.Grid.Web.Data.PivotFields
Thread Safety
Public static (Shared in Visual Basic) members of this type are
safe for multithreaded operations. Instance members are not guaranteed to be
thread-safe.
Example
[C#]
//Gets PivotFields of PivotTable[0]
PivotField field1 = GridWeb1.WebWorksheets.PivotTables[0].PivotFields["field1"];
PivotField field2 = GridWeb1.WebWorksheets.PivotTables[0].PivotFields["field2"];
PivotField field3 = GridWeb1.WebWorksheets.PivotTables[0].PivotFields["field3"];
PivotField field4 = GridWeb1.WebWorksheets.PivotTables[0].PivotFields["field4"];
//Sets Location of PivotFields
field1.Orientation = PivotFieldOrientation.RowField;
field2.Orientation = PivotFieldOrientation.RowField;
field3.Orientation = PivotFieldOrientation.ColumnField;
field4.Orientation = PivotFieldOrientation.DataField;
//Sets function of data field
field3.Function = PivotFieldFunction.Sum;
//Changes row fields order
field2.Position = 1; //Or field1.Position = 2;
[VB]
'Gets PivotFields of PivotTable[0]
Dim field1 As PivotField = GridWeb1.WebWorksheets.PivotTables(0).PivotFields("field1")
Dim field2 As PivotField = GridWeb1.WebWorksheets.PivotTables(0).PivotFields("field2")
Dim field3 As PivotField = GridWeb1.WebWorksheets.PivotTables(0).PivotFields("field3")
Dim field4 As PivotField = GridWeb1.WebWorksheets.PivotTables(0).PivotFields("field4")
'Sets Location of PivotFields
field1.Orientation = PivotFieldOrientation.RowField
field2.Orientation = PivotFieldOrientation.RowField
field3.Orientation = PivotFieldOrientation.ColumnField
field4.Orientation = PivotFieldOrientation.DataField
'Sets function of data field
field3.Function = PivotFieldFunction.Sum
'Changes row fields order
field2.Position = 1 'Or field1.Position = 2;
Requirements
Namespace: Aspose.Grid.Web.Data
Assembly: Aspose.Grid.Web (in Aspose.Grid.Web.dll)
See Also
PivotFields Members | Aspose.Grid.Web.Data Namespace