Spread Windows Forms 11.0 Product Documentation
RegexOptions Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > RegularExpressionValidator Class : RegexOptions Property
Gets or sets the regular expression options.
Syntax
'Declaration
 
Public Property RegexOptions As RegexOptions
'Usage
 
Dim instance As RegularExpressionValidator
Dim value As RegexOptions
 
instance.RegexOptions = value
 
value = instance.RegexOptions
public RegexOptions RegexOptions {get; set;}

Property Value

A bitwise combination of the System.Text.RegularExpressions.RegexOptions. The default is System.Text.RegularExpressions.RegexOptions.None.
Exceptions
ExceptionDescription
The assigned value is not a valid System.Text.RegularExpressions.RegexOptions value.
The assigned value is a conjunction with invalid enumeration values.
Remarks
Enumeration combinations are validated when setting this property.
Example
This example uses the regular expression validator.
//The error backcolor is displayed if the value is invalid
FarPoint.Win.Spread.CellStyleNotify cnotify = new FarPoint.Win.Spread.CellStyleNotify();
cnotify.InvalidCellStyle.BackColor = Color.Lime;
FarPoint.Win.Spread.RegularExpressionValidator rvalidator = new FarPoint.Win.Spread.RegularExpressionValidator();
rvalidator.Expression = "AA";
rvalidator.RegexOptions = System.Text.RegularExpressions.RegexOptions.IgnoreCase;
rvalidator.NullIsValid = true;
rvalidator.Actions.Add(cnotify);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalidator);
'The error backcolor is displayed if the value is invalid
Dim cnotify As New FarPoint.Win.Spread.CellStyleNotify()
cnotify.InvalidCellStyle.BackColor = Color.Lime
Dim rvalidator As New FarPoint.Win.Spread.RegularExpressionValidator()
rvalidator.Expression = "AA"
rvalidator.RegexOptions = System.Text.RegularExpressions.RegexOptions.IgnoreCase
rvalidator.NullIsValid = True
rvalidator.Actions.Add(cnotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalidator)
See Also

Reference

RegularExpressionValidator Class
RegularExpressionValidator Members
Expression Property