Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / ExcludeListValidator Class / ExcludeListValidator Constructor / ExcludeListValidator Constructor()

In This Topic
    ExcludeListValidator Constructor()
    In This Topic
    Represents the default empty constructor.
    Public Function New()
    Dim instance As New ExcludeListValidator()
    public ExcludeListValidator()
    This example uses the exclude list validation.
    //Type one of the candidate items in cell 1,1 to see the error notification
    FarPoint.Win.Spread.CellStyleNotify cnotify = new FarPoint.Win.Spread.CellStyleNotify();
    cnotify.InvalidCellStyle.BackColor = Color.Bisque;
    FarPoint.Win.Spread.ExcludeListValidator excludelist = new FarPoint.Win.Spread.ExcludeListValidator();
    excludelist.Candidates = new string[] { "Bird", "Deer", "Squirrel", "Lizard" };
    fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), excludelist);
    'Type one of the candidate items in cell 1,1 to see the error notification
    Dim cnotify As New FarPoint.Win.Spread.CellStyleNotify()
    cnotify.InvalidCellStyle.BackColor = Color.Bisque
    Dim excludelist As New FarPoint.Win.Spread.ExcludeListValidator()
    excludelist.Candidates = New String() {"Bird", "Deer", "Squirrel", "Lizard"}
    FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), excludelist)
    See Also