Spread for ASP.NET 7.0 Product Documentation
InvalidValueMessage Property
See Also  Example Support Options
FarPoint.Web.Spread.Extender Assembly > FarPoint.Web.Spread.Extender Namespace > MaskedEditValidator Class : InvalidValueMessage Property


Glossary Item Box

Gets or sets the message displayed when invalid and TextBox has focus.

Syntax

Visual Basic (Declaration) 
Public Property InvalidValueMessage As String
Visual Basic (Usage)Copy Code
Dim instance As MaskedEditValidator
Dim value As String
 
instance.InvalidValueMessage = value
 
value = instance.InvalidValueMessage
C# 
public string InvalidValueMessage {get; set;}

Property Value

The invalid value message.

Example

This examples sets the InvalidValueMessage property.
C#Copy Code
FarPoint.Web.Spread.Extender.MaskedEditCellType m = new FarPoint.Web.Spread.Extender.MaskedEditCellType();
m.ShowEditor = true;
m.MaskType = AjaxControlToolkit.MaskedEditType.Number;
m.Mask = "9,999";
    
FarPoint.Web.Spread.Extender.MaskedEditValidator mv = new FarPoint.Web.Spread.Extender.MaskedEditValidator();
mv.MaximumValue = "999";
mv.MinimumValue = "100";
mv.InvalidValueMessage = "Type a number.";
m.MaskedEditValidator = mv;
FpSpread1.Sheets[0].Cells[0, 0].CellType = m;
    
FarPoint.Web.Spread.Extender.DateCalendarCellType dc = new FarPoint.Web.Spread.Extender.DateCalendarCellType();
dc.DateFormat = "yyyy/MM/dd";
AjaxControlToolkit.MaskedEditExtender mee = new AjaxControlToolkit.MaskedEditExtender();
mee.Mask = "9999/99/99";
mee.MaskType = AjaxControlToolkit.MaskedEditType.Date;
mee.ErrorTooltipEnabled = true;
//Add Extender to CellType
dc.Extenders.Add(mee);
dc.ShowEditor = true;
//Configure validator
FarPoint.Web.Spread.Extender.MaskedEditValidator mv1 = new FarPoint.Web.Spread.Extender.MaskedEditValidator();
mv1.MaximumValue = "2010/12/31";
mv1.MinimumValue = "2000/01/01";
mv1.InvalidValueMessage = "Please type a date.";
//Set Validator
dc.MaskedEditValidator = mv1;
FpSpread1.Sheets[0].Cells[1, 0].CellType = dc;

Visual BasicCopy Code
Dim m As New FarPoint.Web.Spread.Extender.MaskedEditCellType
m.ShowEditor = True
m.MaskType = AjaxControlToolkit.MaskedEditType.Number
m.Mask = "9,999"

Dim mv As New FarPoint.Web.Spread.Extender.MaskedEditValidator
mv.MaximumValue = "999"
mv.MinimumValue = "100"
mv.InvalidValueMessage = "Type a number."
m.MaskedEditValidator = mv
FpSpread1.Sheets(0).Cells(0, 0).CellType = m

Dim dc As New FarPoint.Web.Spread.Extender.DateCalendarCellType
dc.DateFormat = "yyyy/MM/dd"
Dim mee As New AjaxControlToolkit.MaskedEditExtender
mee.Mask = "9999/99/99"
mee.MaskType = AjaxControlToolkit.MaskedEditType.Date
mee.ErrorTooltipEnabled = True
'Add Extender to CellType
dc.Extenders.Add(mee)
dc.ShowEditor = True
'Configure validator
Dim mv1 As New FarPoint.Web.Spread.Extender.MaskedEditValidator
mv1.MaximumValue = "2010/12/31"
mv1.MinimumValue = "2000/01/01"
mv1.InvalidValueMessage = "Please type a date."
'Set Validator
dc.MaskedEditValidator = mv1
FpSpread1.Sheets(0).Cells(1, 0).CellType = dc

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.