Spread Windows Forms 11.0 Product Documentation
Encoding Property (EncodingValidator)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > EncodingValidator Class : Encoding Property
Gets or sets the encoding.
Syntax
'Declaration
 
Public Property Encoding As Encoding
'Usage
 
Dim instance As EncodingValidator
Dim value As Encoding
 
instance.Encoding = value
 
value = instance.Encoding
public Encoding Encoding {get; set;}

Property Value

The encoding. The default is System.Text.Encoding.Unicode.
Exceptions
ExceptionDescription
The assigned value is a null reference (Nothing in Visual Basic).
Example
This example uses the encoding validator.
//Press Alt and type 0176 to enter a non-ASCII character in cell 1,1
FarPoint.Win.Spread.ThreeStateIconNotify three = new FarPoint.Win.Spread.ThreeStateIconNotify();
FarPoint.Win.Spread.EncodingValidator compare = new FarPoint.Win.Spread.EncodingValidator();
compare.Encoding = System.Text.Encoding.ASCII;
compare.Actions.Add(three);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare);
'Press Alt and type 0176 to enter a non-ASCII character in cell 1,1
Dim three As New FarPoint.Win.Spread.ThreeStateIconNotify()
Dim compare As New FarPoint.Win.Spread.EncodingValidator()
compare.Encoding = System.Text.Encoding.ASCII
compare.Actions.Add(three)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare)
See Also

Reference

EncodingValidator Class
EncodingValidator Members