Represents a data validation rule which can validate the cell value against two constraint values or formulas.
Inheritance
Constructors
Section titled "Constructors"constructor
public TwoConstraintDataValidationRule() Returns TwoConstraintDataValidationRule
constructor
public TwoConstraintDataValidationRule(TwoConstraintDataValidationOperator validationOperator, DataValidationCriteria validationCriteria) Returns TwoConstraintDataValidationRule
Properties
Section titled "Properties"ValidationCriteria
Section titled "ValidationCriteria"Inherited from: ValueConstraintDataValidationRule
Gets or sets the criteria to use when validating the cell value against the constraint(s).
public DataValidationCriteria ValidationCriteria { get; set; } AllowNull
Section titled "AllowNull"Inherited from: LimitedValueDataValidationRule
Gets or sets the value which indicates whether a null, or blank, value is allowed to be set on a cell.
public bool AllowNull { get; set; } ErrorMessageDescription
Section titled "ErrorMessageDescription"Inherited from: DataValidationRule
Gets or sets the description which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
public string ErrorMessageDescription { get; set; } ErrorMessageTitle
Section titled "ErrorMessageTitle"Inherited from: DataValidationRule
Gets or sets the title which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
public string ErrorMessageTitle { get; set; } ErrorStyle
Section titled "ErrorStyle"Inherited from: DataValidationRule
Gets or sets the value which indicates whether the value is allowed when it is invalid and which options are given to the user in the error dialog shown by Microsoft Excel.
public DataValidationErrorStyle ErrorStyle { get; set; } ImeMode
Section titled "ImeMode"Inherited from: DataValidationRule
Gets or sets the description of the Japanese input rules.
public DataValidationImeMode ImeMode { get; set; } InputMessageDescription
Section titled "InputMessageDescription"Inherited from: DataValidationRule
Gets or sets the description in the tooltip which appears when the user selects the cell in Microsoft Excel.
public string InputMessageDescription { get; set; } InputMessageTitle
Section titled "InputMessageTitle"Inherited from: DataValidationRule
Gets or sets the title in the tooltip which appears when the user selects the cell in Microsoft Excel.
public string InputMessageTitle { get; set; } ShowErrorMessageForInvalidValue
Section titled "ShowErrorMessageForInvalidValue"Inherited from: DataValidationRule
Gets or sets the value which indicates whether the error dialog should appear in Microsoft Excel when invalid data is entered in the cell.
public bool ShowErrorMessageForInvalidValue { get; set; } ShowInputMessage
Section titled "ShowInputMessage"Inherited from: DataValidationRule
Gets or sets the value which indicates whether to show the user an input prompt tooltip when the user selects the cell in Microsoft Excel.
public bool ShowInputMessage { get; set; } ValidationOperator
Section titled "ValidationOperator"Gets or sets the validation operator to use when comparing the cell value against the constraint values or formulas.
public TwoConstraintDataValidationOperator ValidationOperator { get; set; } Methods
Section titled "Methods"Clone()
Section titled "Clone()"Inherited from: DataValidationRule
Creates a copy of this rule which can be applied to other worksheets.
public DataValidationRule Clone() Returns any
GetLowerConstraintFormula(string)
Section titled "GetLowerConstraintFormula(string)"Gets the lower constraint formula used to validate the cell value.
public string GetLowerConstraintFormula(string address) Parameters
- address:
string
Returns any
GetLowerConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)
Section titled "GetLowerConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)"Gets the lower constraint formula used to validate the cell value.
public string GetLowerConstraintFormula(string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture) Parameters
- address:
string - format:
WorkbookFormat - cellReferenceMode:
CellReferenceMode - culture:
CultureInfo
Returns any
GetUpperConstraintFormula(string)
Section titled "GetUpperConstraintFormula(string)"Gets the upper constraint formula used to validate the cell value.
public string GetUpperConstraintFormula(string address) Parameters
- address:
string
Returns any
GetUpperConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)
Section titled "GetUpperConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)"Gets the upper constraint formula used to validate the cell value.
public string GetUpperConstraintFormula(string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture) Parameters
- address:
string - format:
WorkbookFormat - cellReferenceMode:
CellReferenceMode - culture:
CultureInfo
Returns any
IsEquivalentTo(DataValidationRule)
Section titled "IsEquivalentTo(DataValidationRule)"Indicates if this rule is structurally equivalent to another.
public override bool IsEquivalentTo(DataValidationRule other) Parameters
- other:
DataValidationRule
Returns any
SetLowerConstraint(DateTime)
Section titled "SetLowerConstraint(DateTime)"Sets the lower constraint value used to validate the cell value.
public void SetLowerConstraint(DateTime value) Parameters
- value:
DateTime
Returns any
SetLowerConstraint(double)
Section titled "SetLowerConstraint(double)"Sets the lower constraint value used to validate the cell value.
public void SetLowerConstraint(double value) Parameters
- value:
double
Returns any
SetLowerConstraint(TimeSpan)
Section titled "SetLowerConstraint(TimeSpan)"Sets the lower constraint value used to validate the cell value.
public void SetLowerConstraint(TimeSpan value) Parameters
- value:
TimeSpan
Returns any
SetLowerConstraintFormula(string, string)
Section titled "SetLowerConstraintFormula(string, string)"Gets the lower constraint formula used to validate the cell value.
public void SetLowerConstraintFormula(string lowerConstraintFormula, string address) Parameters
- lowerConstraintFormula:
string - address:
string
Returns any
SetLowerConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)
Section titled "SetLowerConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)"Gets the lower constraint formula used to validate the cell value.
public void SetLowerConstraintFormula(string lowerConstraintFormula, string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture) Parameters
- lowerConstraintFormula:
string - address:
string - format:
WorkbookFormat - cellReferenceMode:
CellReferenceMode - culture:
CultureInfo
Returns any
SetUpperConstraint(DateTime)
Section titled "SetUpperConstraint(DateTime)"Sets the upper constraint value used to validate the cell value.
public void SetUpperConstraint(DateTime value) Parameters
- value:
DateTime
Returns any
SetUpperConstraint(double)
Section titled "SetUpperConstraint(double)"Sets the upper constraint value used to validate the cell value.
public void SetUpperConstraint(double value) Parameters
- value:
double
Returns any
SetUpperConstraint(TimeSpan)
Section titled "SetUpperConstraint(TimeSpan)"Sets the upper constraint value used to validate the cell value.
public void SetUpperConstraint(TimeSpan value) Parameters
- value:
TimeSpan
Returns any
SetUpperConstraintFormula(string, string)
Section titled "SetUpperConstraintFormula(string, string)"Gets the upper constraint formula used to validate the cell value.
public void SetUpperConstraintFormula(string upperConstraintFormula, string address) Parameters
- upperConstraintFormula:
string - address:
string
Returns any
SetUpperConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)
Section titled "SetUpperConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)"Gets the upper constraint formula used to validate the cell value.
public void SetUpperConstraintFormula(string upperConstraintFormula, string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture) Parameters
- upperConstraintFormula:
string - address:
string - format:
WorkbookFormat - cellReferenceMode:
CellReferenceMode - culture:
CultureInfo
Returns any
TryGetLowerConstraint(out DateTime)
Section titled "TryGetLowerConstraint(out DateTime)"Tries to obtain the value of the lower constraint.
public bool TryGetLowerConstraint(out DateTime value) Parameters
- value:
DateTime
Returns any
TryGetLowerConstraint(out double)
Section titled "TryGetLowerConstraint(out double)"Tries to obtain the value of the lower constraint.
public bool TryGetLowerConstraint(out double value) Parameters
- value:
double
Returns any
TryGetLowerConstraint(out TimeSpan)
Section titled "TryGetLowerConstraint(out TimeSpan)"Tries to obtain the value of the lower constraint.
public bool TryGetLowerConstraint(out TimeSpan value) Parameters
- value:
TimeSpan
Returns any
TryGetUpperConstraint(out DateTime)
Section titled "TryGetUpperConstraint(out DateTime)"Tries to obtain the value of the upper constraint.
public bool TryGetUpperConstraint(out DateTime value) Parameters
- value:
DateTime
Returns any
TryGetUpperConstraint(out double)
Section titled "TryGetUpperConstraint(out double)"Tries to obtain the value of the upper constraint.
public bool TryGetUpperConstraint(out double value) Parameters
- value:
double
Returns any
TryGetUpperConstraint(out TimeSpan)
Section titled "TryGetUpperConstraint(out TimeSpan)"Tries to obtain the value of the upper constraint.
public bool TryGetUpperConstraint(out TimeSpan value) Parameters
- value:
TimeSpan