Class GridFormulaTag
Defines a class that encapsulates the parsed formula and computed value for a cell.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridFormulaTag : ISerializable, ICloneable
Remarks
This class holds the parsed value of the formula in its Formula property, and holds the computed value of the formula in its Text property. Each cell that is a formula cell stores a GridFormulaTag object in its GridStyleInfo.FormulaTag property. When the cell is drawn, if its GridFormulaTag.Formula property is empty, the formula in the GridStyleInfo.Text property is parsed, and placed into the GridFormulaTag.Formula property. If the GridFormulaTag.Text property is empty, the GridFormulaTag.Formula is computed, and the computed value is stored in GridFormulaTag.Text. Thus, formulas are parsed and computed only when the GridFormulaTag member is empty, otherwise, the stored values are used. Emptying these properties is how the Formula Engine initiates a refresh of the calculated values when dependent cells are modified.
Constructors
GridFormulaTag()
Initializes a new instances of the GridFormulaTag class.
Declaration
public GridFormulaTag()
GridFormulaTag(SerializationInfo, StreamingContext)
Initializes a new instances of the GridFormulaTag class with the specified serialization info and streaming context.
Declaration
protected GridFormulaTag(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or deserialize this instance. |
System.Runtime.Serialization.StreamingContext | context | Describes the source and destination of the serialized stream specified by info. |
GridFormulaTag(String, String)
Initializes a new instances of the GridFormulaTag class specified with the formula and text.
Declaration
public GridFormulaTag(string formula, string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | formula | The parsed formula. |
System.String | text | The computed value. |
GridFormulaTag(String, String, Int32, Int32)
Initializes a new instances of the GridFormulaTag class specified with the formula, text, row and column index.
Declaration
public GridFormulaTag(string formula, string text, int row, int col)
Parameters
Type | Name | Description |
---|---|---|
System.String | formula | The parsed formula. |
System.String | text | The computed value. |
System.Int32 | row | The row at which this formula is being parsed. |
System.Int32 | col | The col at which this formula is being parsed. |
Properties
Formula
Gets or sets the value of parsed formula.
Declaration
public string Formula { get; set; }
Property Value
Type |
---|
System.String |
ParsedCol
Gets or sets the value of column where the formula was last parsed.
Declaration
public int ParsedCol { get; set; }
Property Value
Type |
---|
System.Int32 |
ParsedRow
Gets or sets the value of column where the formula was last parsed.
Declaration
public int ParsedRow { get; set; }
Property Value
Type |
---|
System.Int32 |
Text
Gets or sets the value of text representing the computed value.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |
Methods
Clone()
Creates a copy of this object.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A copy of this object. |
ToString()
Overrides and returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | Displays the parsed formula and computed value. |
Overrides
Explicit Interface Implementations
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |