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

FinishRegistration(Workbook)

Called only by the factory to register this expression with the workbook.

Declaration

cs-api-definition
protected void FinishRegistration(Workbook workbook)

Parameters

workbook

Workbook

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()

IsRegistered()

Determines whether the current instance is registered in the calculation map of the workbook.

Declaration

cs-api-definition
protected virtual bool IsRegistered()

Returns

bool

true if the instance is registered; otherwise, false.

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