Class
ListDataValidationRule

Validates that cell input matches one of the values in a specified list or range.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.DataValidation

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public sealed class ListDataValidationRule : SingleArgumentDataValidationRuleBase, IDataValidationRule

Inheritance: objectDataValidationRuleBaseSingleArgumentDataValidationRuleBaseListDataValidationRule

Implements: IDataValidationRule

Inherited Members SingleArgumentDataValidationRuleBase.IgnoreBlankSingleArgumentDataValidationRuleBase.CellIndexSingleArgumentDataValidationRuleBase.Argument1DataValidationRuleBase.Evaluate(Worksheet, int, int, ICellValue)DataValidationRuleBase.ShowInputMessageDataValidationRuleBase.InputMessageTitleDataValidationRuleBase.InputMessageContentDataValidationRuleBase.ShowErrorMessageDataValidationRuleBase.ErrorStyleDataValidationRuleBase.ErrorAlertTitleDataValidationRuleBase.ErrorAlertContent

Constructors

ListDataValidationRule(ListDataValidationRuleContext)

Initializes a new ListDataValidationRule with the specified list source and dropdown settings.

Declaration

cs-api-definition
public ListDataValidationRule(ListDataValidationRuleContext context)

Parameters

context

ListDataValidationRuleContext

The context.

Properties

InCellDropdown

Controls whether a dropdown arrow appears in the cell to display available list values.

Declaration

cs-api-definition
public bool InCellDropdown { get; set; }

Property Value

bool

The a value indicating if an cell dropdown should be shown.

Methods

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

EvaluateOverride(Worksheet, int, int, ICellValue)

Evaluates whether the specified cell value matches any item in the list.

Declaration

cs-api-definition
protected override bool EvaluateOverride(Worksheet worksheet, int rowIndex, int columnIndex, ICellValue cellValue)

Parameters

worksheet

Worksheet

The worksheet.

rowIndex

int

Index of the row.

columnIndex

int

Index of the column.

cellValue

ICellValue

The cell value.

Returns

bool

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

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

ExtractListItems(Worksheet, CellIndex)

Extracts the list items defined by this rule for the specified cell location.

Declaration

cs-api-definition
public IEnumerable<string> ExtractListItems(Worksheet worksheet, CellIndex cellIndex)

Parameters

worksheet

Worksheet

The worksheet.

cellIndex

CellIndex

Index of the cell.

Returns

IEnumerable<string>

ExtractListItems(Worksheet, int, int)

Extracts the list items defined by this rule for the specified cell location.

Declaration

cs-api-definition
public IEnumerable<string> ExtractListItems(Worksheet worksheet, int rowIndex, int columnIndex)

Parameters

worksheet

Worksheet

The worksheet.

rowIndex

int

Index of the row.

columnIndex

int

Index of the column.

Returns

IEnumerable<string>

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides SingleArgumentDataValidationRuleBase.GetHashCode()