Spread Windows Forms 12.0 Product Documentation
InvalidCellStyle Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > CellStyleNotify Class : InvalidCellStyle Property
Gets or sets a StyleInfo object that is used for the validating cell when the validation fails.
Syntax
'Declaration
 
Public Property InvalidCellStyle As AppearanceStyleInfo
'Usage
 
Dim instance As CellStyleNotify
Dim value As AppearanceStyleInfo
 
instance.InvalidCellStyle = value
 
value = instance.InvalidCellStyle
public AppearanceStyleInfo InvalidCellStyle {get; set;}

Property Value

A StyleInfo value that is used for the validating cell when validation fails.
Example
This example uses the range validation.
FarPoint.Win.Spread.CellStyleNotify stylenotify = new FarPoint.Win.Spread.CellStyleNotify();
stylenotify.InvalidCellStyle.BackColor = Color.Aquamarine;
FarPoint.Win.Spread.RangeValidator rvalid = new FarPoint.Win.Spread.RangeValidator();
rvalid.MaxValue = 10;
rvalid.MinValue = 0;
rvalid.Actions.Add(stylenotify);            
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalid);
Dim stylenotify As New FarPoint.Win.Spread.CellStyleNotify()
stylenotify.InvalidCellStyle.BackColor = Color.Aquamarine
Dim rvalid As New FarPoint.Win.Spread.RangeValidator()
rvalid.MaxValue = 10
rvalid.MinValue = 0
rvalid.Actions.Add(stylenotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalid)
See Also

Reference

CellStyleNotify Class
CellStyleNotify Members