Class PivotComputationInfo
This class holds the information needed for the calculations that appear in a Pivot control. For each calculation seen, there is an associated PivotComputationInfo object that is added to the PivotComputationInfo collection.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.PivotAnalysis.Base
Assembly: Syncfusion.PivotAnalysis.Base.dll
Syntax
public class PivotComputationInfo : INotifyPropertyChanged, IXmlSerializable
Constructors
PivotComputationInfo()
Performs certain manipulations with data using summary type.
Declaration
public PivotComputationInfo()
Properties
AllowFilter
Gets or sets whether this calculation column can be filtered when RowPivotsOnly is true in the PivotEngine.
Declaration
public bool AllowFilter { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowRunTimeGroupByField
Gets or sets value to enable/disable grouping for this PivotItem. Default value is true.
Declaration
public bool AllowRunTimeGroupByField { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowSort
Gets or sets whether this calculation column can be sorted when RowPivotsOnly is true in the PivotEngine.
Declaration
public bool AllowSort { get; set; }
Property Value
Type |
---|
System.Boolean |
BaseField
Gets or sets the value of base field for calculations.
Declaration
public string BaseField { get; set; }
Property Value
Type |
---|
System.String |
BaseItem
Gets or sets the value of base item for calculations.
Declaration
public string BaseItem { get; set; }
Property Value
Type |
---|
System.String |
CalculationName
Gets or sets what needs displayed in the PivotTable if more than one calculation is included in the Pivot control.
Declaration
public string CalculationName { get; set; }
Property Value
Type |
---|
System.String |
CalculationType
Gets or sets the calculation type for this computation object.
Declaration
public CalculationType CalculationType { get; set; }
Property Value
Type |
---|
CalculationType |
CssClass
Gets or sets CSS class for individual field.
Declaration
public string CssClass { get; set; }
Property Value
Type |
---|
System.String |
Remarks
This is applicable only for Web platforms.
DefaultValue
Gets or sets the default value to be used when this summary calculation gets null value.
Declaration
public object DefaultValue { get; set; }
Property Value
Type |
---|
System.Object |
Description
Gets or sets a description for this calculation.
Declaration
public string Description { get; set; }
Property Value
Type |
---|
System.String |
DisplayOption
This is used to display or hide the computation values in PivotEngine based on the option provided.
Declaration
public DisplayOption DisplayOption { get; set; }
Property Value
Type |
---|
DisplayOption |
EnableHyperlinks
Gets or sets whether this calculation column should be hyperlinked when RowPivotsOnly is true in the PivotEngine.
Declaration
public bool EnableHyperlinks { get; set; }
Property Value
Type |
---|
System.Boolean |
Expression
Used internally for formula calculation types.
Declaration
public FilterExpression Expression { get; set; }
Property Value
Type |
---|
FilterExpression |
FieldCaption
Gets or sets the title you want to see in the header for this item.
Declaration
public string FieldCaption { get; set; }
Property Value
Type |
---|
System.String |
FieldHeader
Gets or sets the title you want to see in the header for this item.
Declaration
public string FieldHeader { get; set; }
Property Value
Type |
---|
System.String |
FieldName
Gets or sets the name of the property to be used in this calculation.
Declaration
public string FieldName { get; set; }
Property Value
Type |
---|
System.String |
FieldType
Gets or sets the value of field type.
Declaration
public string FieldType { get; set; }
Property Value
Type |
---|
System.String |
Format
Gets or sets the format string used to format this calculation results in the Pivot control. Default format string is #.##.
Declaration
public string Format { get; set; }
Property Value
Type |
---|
System.String |
Formula
Gets or sets a formula that defines the value as an algebraic expression of other computations where these computations are referenced by their CalculationName enclosed within square brackets.
Declaration
public string Formula { get; set; }
Property Value
Type |
---|
System.String |
Remarks
For example, if the value of formula is "[AvgPrice]-[AvgCost]", then there should be two other computations whose names are AvgPrice and AvgCost, and the value displayed for this computation should be the difference between those two values.
InnerMostComputationsOnly
Gets or sets whether the aggregation result should appear only for the innermost level.
Declaration
public SummaryDisplayLevel InnerMostComputationsOnly { get; set; }
Property Value
Type |
---|
SummaryDisplayLevel |
IsTopColumnSummary
Gets or sets whether this calculation column only displays the subtotals for top column
Declaration
public bool IsTopColumnSummary { get; set; }
Property Value
Type |
---|
System.Boolean |
PadString
This is used to specify a custom string in the PivotComputation column instead of the original cell value. To use this, we must set SummaryType as DisplayIfDiscreteValuesEqual.
Declaration
public string PadString { get; set; }
Property Value
Type |
---|
System.String |
Summary
Gets or sets the SummaryBase object that is used to define this calculation. This value is automatically set when you specify any non-custom value of SummaryType. If you specify SummaryType.Custom, then you are required to set Summary to be an instance of your custom SummaryBase derived object.
Declaration
public SummaryBase Summary { get; set; }
Property Value
Type |
---|
SummaryBase |
SummaryType
Gets or sets the SummaryType enumeration for this calculation. Setting it to any value other than "Custom" will properly set the summary.
Declaration
public SummaryType SummaryType { get; set; }
Property Value
Type |
---|
SummaryType |
Methods
GetComputationTypes()
Returns a sorted list of computation names based on the SummaryType enumerations.
Declaration
public static List<string> GetComputationTypes()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | A list of computation names. |
GetSchema()
This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the System.Xml.Serialization.XmlSchemaProviderAttribute to the class.
Declaration
public XmlSchema GetSchema()
Returns
Type | Description |
---|---|
System.Xml.Schema.XmlSchema | An System.Xml.Schema.XmlSchema that describes the XML representation of the object that is produced by the System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter) method and consumed by the System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader) method. |
GetSummaryInstance(SummaryType)
Returns a SummaryBase object of the specified SummaryType.
Declaration
public static SummaryBase GetSummaryInstance(SummaryType st)
Parameters
Type | Name | Description |
---|---|---|
SummaryType | st | The SummaryType. |
Returns
Type | Description |
---|---|
SummaryBase | A SummaryBase object. |
ReadXml(XmlReader)
Generates an object from its XML representation.
Declaration
public void ReadXml(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader stream from which the object is deserialized. |
ToString()
Converts to string
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | Calculation name displayed in the PivotTable. |
Overrides
WriteXml(XmlWriter)
Converts an object into its XML representation.
Declaration
public void WriteXml(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | The System.Xml.XmlWriter stream to which the object is serialized. |
Events
PropertyChanged
Event denoting whether the property is changed.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
System.ComponentModel.PropertyChangedEventHandler |