TDataValidationInfo Record
Contains the information to define a data validation in a range of cells.
Syntax
Unit: FlexCel.Core
TDataValidationInfo = record;
Methods
Name | Description |
---|---|
Empty | Empty constructor. Creates a new instance of TDataValidationInfo without assigning any value. |
Create | Creates a new Data Validation condition with all parameters. |
CompareTo | Compares the object with other. |
Equals | Returns true if both objects are equal. |
IsNull | Returns true if the record doesn't have a defined value. |
HasValue | Returns true if the record has a defined value. This is the inverse of IsNull |
Operators
Name | Description |
---|---|
Equality | Adapts the = operator so it returns true when both instances have the same values. |
Inequality | Adapts the <> operator so it returns true when both instances have different values. |
Properties
Name | Description |
---|---|
ValidationType | Type of validation we will be doing. |
Condition | Condition used to apply the data validation. |
FirstFormula | Formula for the first condition of the data validation. The text of the formula is limited to 255 characters. If ExplicitList is true, this formula can contain a list of values. Note that with relative references, we always consider "A1" to be the cell where the data validation is. This means that the formula: "=$A$1 + A1" when evaluated in Cell B8, will read "=$A$1 + B8". To provide a negative offset, you need to wrap the formula. For example "=A1048575" will evaluate to B7 when evaluated in B8. |
SecondFormula | Formula for the second condition of the data validation, if it has two conditions. The text of the formula is limited to 255 characters. Note that with relative references, we always consider "A1" to be the cell where the data validation is. This means that the formula: "=$A$1 + A1" when evaluated in Cell B8, will read "=$A$1 + B8". To provide a negative offset, you need to wrap the formula. For example "=A1048575" will evaluate to B7 when evaluated in B8. |
IgnoreEmptyCells | If true Empty cells will not trigger data validation errors. |
InCellDropDown | When the ValidationType parameter is a list, this property indicates whether to display a drop down box or not. |
ExplicitList | If true, FirstFormula contains a list of values. In this case, Formula1 must be a formula of the type: ="string", where string is a list of values separated by Character(0). For example, in C# Formula1 could be: ="Apples\0Lemmons\0Melons In Delphi.NET, Formula1 could be: '="Apples' + #0 + 'Lemmons' + #0 + 'Melons' |
ShowErrorBox | If true, an error box dialog will be shown when the user enters an invalid value. |
ErrorBoxCaption | Caption of the Error Alert box. Note that this text cannot be longer than 32 characters. Extra characters will be truncated. If this parameter is null, the default Error alert will be displayed. If ShowErrorBox is false, this parameter does nothing. |
ErrorBoxText | Text on the Error Alert box. Note that this text cannot be longer than 225 characters. Extra characters will be truncated. If this parameter is null, the default Error alert will be displayed. If ShowErrorBox is false, this parameter does nothing. |
ShowInputBox | If true, a box showing a message will be shown when the user selecte the cell. |
InputBoxCaption | Caption of the Input Message box. Note that this text cannot be longer than 32 characters. Extra characters will be truncated. If this parameter is null, the Input box will display the default message. if ShowInputBox is false, this parameter does nothing. |
InputBoxText | Text on the Input Message box. Note that this text cannot be longer than 255 characters. Extra characters will be truncated. If this parameter is null, the Input box will display the default message. if ShowInputBox is false, this parameter does nothing. |
ErrorIcon | Icon to display in the error box. |
ImeMode | The IME (input method editor) mode enforced by this data validation. |