Spread Windows Forms 11.0 Product Documentation
RequiredFieldValidator Constructor()
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > RequiredFieldValidator Class > RequiredFieldValidator Constructor : RequiredFieldValidator Constructor()
Represents the default empty constructor.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New RequiredFieldValidator()
public RequiredFieldValidator()
Example
This example uses the required field validator.
//Cell 1,1 requires a value
FarPoint.Win.Spread.CellStyleNotify cnotify = new FarPoint.Win.Spread.CellStyleNotify();
cnotify.InvalidCellStyle.BackColor = Color.Fuchsia;
FarPoint.Win.Spread.RequiredFieldValidator requiredv = new FarPoint.Win.Spread.RequiredFieldValidator();
requiredv.Actions.Add(cnotify);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), requiredv);
fpSpread1.Sheets[0].Cells[1, 1].Text = "Value";
'Cell 1,1 requires a value
Dim cnotify As New FarPoint.Win.Spread.CellStyleNotify()
cnotify.InvalidCellStyle.BackColor = Color.Fuchsia
Dim requiredv As New FarPoint.Win.Spread.RequiredFieldValidator()
requiredv.Actions.Add(cnotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), requiredv)
FpSpread1.Sheets(0).Cells(1, 1).Text = "Value"
See Also

Reference

RequiredFieldValidator Class
RequiredFieldValidator Members
Overload List