Back to Devexpress

DataValidationCollection.Validate(Cell) Method

officefileapi-devexpress-dot-spreadsheet-dot-datavalidationcollection-dot-validate-x28-devexpress-dot-spreadsheet-dot-cell-x29.md

latest2.4 KB
Original Source

DataValidationCollection.Validate(Cell) Method

Validates the specified cell value.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool Validate(
    Cell cell
)
vb
Function Validate(
    cell As Cell
) As Boolean

Parameters

NameTypeDescription
cellCell

A Cell object whose value should be validated.

|

Returns

TypeDescription
Boolean

true , if the cell value meets the data validation criteria applied to that cell; otherwise, false.

|

Remarks

Use the Validate method to check whether a particular cell in a worksheet contains valid data. If the validated cell is empty, the Validate method’s result depends on the DataValidation.AllowBlank property of the data validation rule applied to this cell. If a cell does not have any data validation applied, the Validate method always returns true.

Use the other Validate method overload to check whether a value that should be assigned to the specified cell meets the data validation criteria applied to that cell.

The DataValidationCollection.GetInvalidCells method allows you to obtain the collection of cells that do not match the data validation criteria in a worksheet.

See Also

GetInvalidCells()

DataValidationCollection Interface

DataValidationCollection Members

DevExpress.Spreadsheet Namespace