Class GridFormulaTag
Support class that encapsulates the parsed formula and computed value for a cell.
Inheritance
Implements
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public class GridFormulaTag : Object, 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()
Default Constructor.
Declaration
public GridFormulaTag()
GridFormulaTag(SerializationInfo, StreamingContext)
Initializes a new GridFormulaTag from a serialization stream.
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)
Constructor.
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)
Constructor.
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 / sets the parsed formula.
Declaration
public string Formula { get; set; }
Property Value
Type |
---|
System.String |
ParsedCol
Gets the column where the formula was last parsed.
Declaration
public int ParsedCol { get; set; }
Property Value
Type |
---|
System.Int32 |
ParsedRow
Gets the column where the formula was last parsed.
Declaration
public int ParsedRow { get; set; }
Property Value
Type |
---|
System.Int32 |
Text
Get / sets 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. |
Reset()
Sets Text and Formula to null and ParsedRow and ParsedCol to -1.
Declaration
public void Reset()
ResetFormula()
Sets Text and Formula to null.
Declaration
public void ResetFormula()
ResetText()
Sets Text to null.
Declaration
public void ResetText()
ToString()
Overriden.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | Displays the parsed formula and computed value. |