Class
RadExpression

Abstract base for all spreadsheet expressions, providing lazy evaluation, change propagation, and value caching for formula calculation.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Expressions

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public abstract class RadExpression

Inheritance: objectRadExpression

Derived Classes: CellReferenceRangeExpressionConstantExpressionFunctionExpressionOperatorExpressionSpreadsheetNameExpression

Constructors

RadExpression()

Initializes a new expression with an unknown evaluation state.

Declaration

cs-api-definition
protected RadExpression()

Methods

AttachToChildEvent(RadExpression)

Subscribes to value change events from a single child expression to propagate invalidation upward.

Declaration

cs-api-definition
protected void AttachToChildEvent(RadExpression childExpression)

Parameters

childExpression

RadExpression

The child expression.

AttachToChildrenEvent(IEnumerable<RadExpression>)

Subscribes to value change events from multiple child expressions to propagate invalidation upward.

Declaration

cs-api-definition
protected void AttachToChildrenEvent(IEnumerable<RadExpression> childExpressions)

Parameters

childExpressions

IEnumerable<RadExpression>

The child expressions.

GetValue()

Evaluates and returns the computed value, detecting cyclic references during calculation.

Declaration

cs-api-definition
public RadExpression GetValue()

Returns

RadExpression

The value as RadExpression.

GetValueAsString()

Evaluates the expression and returns the result formatted as a string.

Declaration

cs-api-definition
public string GetValueAsString()

Returns

string

The value as string.

GetValueAsString(CultureInfo)

Evaluates the expression and returns the result formatted according to the specified culture.

Declaration

cs-api-definition
public string GetValueAsString(CultureInfo cultureInfo)

Parameters

cultureInfo

CultureInfo

The culture info.

Returns

string

The value as string.

GetValueOverride()

Calculates the expression result; override to define specific evaluation logic for each expression type.

Declaration

cs-api-definition
protected abstract RadExpression GetValueOverride()

Returns

RadExpression

The value as RadExpression.

InvalidateValue()

Marks the cached value as invalid, triggering recalculation on next access and propagating invalidation to dependent expressions.

Declaration

cs-api-definition
protected void InvalidateValue()

OnValueInvalidated()

Raises the ValueInvalidated event to notify dependent expressions.

Declaration

cs-api-definition
protected virtual void OnValueInvalidated()

ToString()

Converts the expression to its formula string representation using default culture.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current object.

Overrides object.ToString()

ToString(CultureInfo)

Converts the expression to its formula string representation using the specified culture for number and list separators.

Declaration

cs-api-definition
public string ToString(CultureInfo cultureInfo)

Parameters

cultureInfo

CultureInfo

The culture info.

Returns

string

The expression as string.

Events

ValueInvalidated

Raised when the expression's cached value becomes invalid and requires recalculation.

Declaration

cs-api-definition
public event EventHandler ValueInvalidated

Event Value

EventHandler

Extension Methods