DataValidationRule Class

Represents a data validation rule that can be applied to a range of cells.

Inheritance

Object

Documents.Spreadsheet.DataValidationRule

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class DataValidationRule : Documents.Spreadsheet.ICellValidator

Constructors

DataValidationRulelink

Represents a data validation rule that can be applied to a range of cells.

Declaration
public DataValidationRule()

Properties

AllowBlanklink

Gets or sets whether blank cells are allowed.

Declaration
public bool AllowBlank { get; set; }
Property Value
Type Description
boolGets or sets whether blank cells are allowed.

Errorlink

Gets or sets the error message.

Declaration
public string Error { get; set; }
Property Value
Type Description
stringGets or sets the error message.

ErrorStylelink

Gets or sets the error style.

Declaration
public Documents.Spreadsheet.DataValidationErrorStyle ErrorStyle { get; set; }
Property Value
Type Description
Documents.Spreadsheet.DataValidationErrorStyleGets or sets the error style.

ErrorTitlelink

Gets or sets the error dialog title.

Declaration
public string ErrorTitle { get; set; }
Property Value
Type Description
stringGets or sets the error dialog title.

Formula1link

Gets or sets the first formula or value for comparison.

Declaration
public string Formula1 { get; set; }
Property Value
Type Description
stringGets or sets the first formula or value for comparison.

Formula2link

Gets or sets the second formula or value for comparison (used with Between/NotBetween).

Declaration
public string Formula2 { get; set; }
Property Value
Type Description
stringGets or sets the second formula or value for comparison (used with Between/NotBetween).

InputMessagelink

Gets or sets the input message.

Declaration
public string InputMessage { get; set; }
Property Value
Type Description
stringGets or sets the input message.

InputTitlelink

Gets or sets the input message title.

Declaration
public string InputTitle { get; set; }
Property Value
Type Description
stringGets or sets the input message title.

ListItemslink

Gets the list items for List type validation, parsed from Formula1.

Declaration
public IReadOnlyList<string> ListItems { get; }
Property Value
Type Description
IReadOnlyList<string>Gets the list items for List type validation, parsed from Formula1.

Operatorlink

Gets or sets the comparison operator.

Declaration
public Documents.Spreadsheet.DataValidationOperator Operator { get; set; }
Property Value
Type Description
Documents.Spreadsheet.DataValidationOperatorGets or sets the comparison operator.

ShowErrorMessagelink

Gets or sets whether to show the error message.

Declaration
public bool ShowErrorMessage { get; set; }
Property Value
Type Description
boolGets or sets whether to show the error message.

ShowInputMessagelink

Gets or sets whether to show the input message.

Declaration
public bool ShowInputMessage { get; set; }
Property Value
Type Description
boolGets or sets whether to show the input message.

Typelink

Gets or sets the type of data validation.

Declaration
public Documents.Spreadsheet.DataValidationType Type { get; set; }
Property Value
Type Description
Documents.Spreadsheet.DataValidationTypeGets or sets the type of data validation.

Methods

GetListItemslink

Gets the list items for List type validation, resolving cell range references from the given sheet.

Declaration
public IReadOnlyList<string> GetListItems(Documents.Spreadsheet.Worksheet sheet)
Parameters
Type Name Description
Documents.Spreadsheet.Worksheet sheet
Returns
Type Description
IReadOnlyList<string>

Validatelink

Declaration
public bool Validate(Documents.Spreadsheet.Cell cell)
Parameters
Type Name Description
Documents.Spreadsheet.Cell cell
Returns
Type Description
bool

Validatelink

Declaration
public bool Validate(Documents.Spreadsheet.Cell cell, Documents.Spreadsheet.CellRef rangeStart)
Parameters
Type Name Description
Documents.Spreadsheet.Cell cell
Documents.Spreadsheet.CellRef rangeStart
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙