DataValidationCollection.Validate(Cell) Method
Validates the specified cell value.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
cell | Cell | A Cell object whose value should be validated. |
Returns
Type | Description |
---|---|
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.