New to Telerik Document ProcessingStart a free 30-day trial

Abstract base for numeric data validation rules that compare cell values against numeric boundaries using comparison operators.

Definition

Constructors

Initializes a new NumberDataValidationRuleBase from the specified numeric validation context.

C#
protected NumberDataValidationRuleBase(NumberDataValidationRuleContext context)
Parameters:contextNumberDataValidationRuleContext

The context.

Methods

Compares the cell value against the validation arguments using the configured comparison operator.

C#
protected bool CompareValues(double? cellValueResult, double? argument1, double? argument2)
Parameters:cellValueResultdouble?

The cell value result.

argument1double?

The argument1.

argument2double?

The argument2.

Returns:

bool

Retrurns True if the rule is satisfied, else returns False.

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

true if the specified object is equal to the current object; otherwise, false.

Overrides: SingleArgumentDataValidationRuleBase.Equals(object)

Evaluates the numeric validation rule by comparing the cell value against the configured numeric boundaries.

C#
protected override bool EvaluateOverride(Worksheet worksheet, int rowIndex, int columnIndex, ICellValue cellValue)
Parameters:worksheetWorksheet

The worksheet.

rowIndexint

Index of the row.

columnIndexint

Index of the column.

cellValueICellValue

The cell value.

Returns:

bool

Retrurns True if the rule is satisfied, else returns False.

Overrides: DataValidationRuleBase.EvaluateOverride(Worksheet, int, int, ICellValue)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: SingleArgumentDataValidationRuleBase.GetHashCode()

Properties

Second boundary value for range-based comparisons such as Between and NotBetween operators.

C#
public ICellValue Argument2 { get; }
Property Value:

The second argument.

Comparison operator used to evaluate the cell value against the validation arguments.

C#
public ComparisonOperator ComparisonOperator { get; }
Property Value:

The comparison operator.

Indicates whether the rule restricts input to whole numbers without decimal fractions.

C#
protected virtual bool RequireWholeNumbers { get; }
Property Value:

The value indicating if the rule requires whole numbers as a result of the argument expression.