Class PivotFieldCollection
Represents the pivot field collection class used by the spreadsheet model.
Inherited Members
Namespace: DRIT.Spreadsheet.Pivot
Assembly: DRIT.Spreadsheet.dll
Syntax
public class PivotFieldCollection : IEnumerable<PivotField>, IEnumerable
Properties
Count
Gets the number of pivot fields in this collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets the pivot field at the specified index.
Declaration
public PivotField this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the field. |
Property Value
| Type | Description |
|---|---|
| PivotField | The pivot field at the specified index. |
this[string]
Gets the pivot field with the specified name.
Declaration
public PivotField this[string name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the field. |
Property Value
| Type | Description |
|---|---|
| PivotField | The pivot field with the specified name. |
Methods
Add(string)
Adds the source field with the given name to this area of the pivot table.
Declaration
public PivotField Add(string sourceFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sourceFieldName | The source field name as it appears in the data source header row. |
Returns
| Type | Description |
|---|---|
| PivotField |
Clear()
Removes all pivot fields from this collection and clears the associated pivot table definition.
Declaration
public void Clear()
GetEnumerator()
Returns an enumerator for iterating over the pivot fields in this collection.
Declaration
public IEnumerator<PivotField> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<PivotField> | An enumerator for the pivot fields. |