Spread Windows Forms 12.0 Product Documentation
Format Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > CharFormatValidator Class : Format Property
Gets or sets the format string used for validation.
Syntax
'Declaration
 
Public Property Format As String
'Usage
 
Dim instance As CharFormatValidator
Dim value As String
 
instance.Format = value
 
value = instance.Format
public string Format {get; set;}

Property Value

A System.String that indicates the format string used for validation. The default is System.String.Empty.
Example
This example creates a character format validator.
FarPoint.Win.Spread.CellStyleNotify cnotify = new FarPoint.Win.Spread.CellStyleNotify();
cnotify.InvalidCellStyle.BackColor = Color.Aqua;
FarPoint.Win.Spread.CharFormatValidator cFormatValidator1 = new FarPoint.Win.Spread.CharFormatValidator();
cFormatValidator1.Format = "Aa";
cFormatValidator1.Actions.Add(cnotify);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), cFormatValidator1);
Dim cnotify As New FarPoint.Win.Spread.CellStyleNotify()
cnotify.InvalidCellStyle.BackColor = Color.Aqua
Dim charFormatValidator1 As New FarPoint.Win.Spread.CharFormatValidator()
charFormatValidator1.Format = "Aa"
charFormatValidator1.Actions.Add(cnotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), charFormatValidator1)
See Also

Reference

CharFormatValidator Class
CharFormatValidator Members