Spread for ASP.NET 8.0 Product Documentation
ValidationErrorMessage Property
Example 


Gets or sets the validation error message.
Syntax
'Declaration
 
Public Property ValidationErrorMessage As String
'Usage
 
Dim instance As FpSpread
Dim value As String
 
instance.ValidationErrorMessage = value
 
value = instance.ValidationErrorMessage
public string ValidationErrorMessage {get; set;}
Example
This example displays an error message if the data is not valid.
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator" ValidationExpression="\d{5}">Enter 5 digits</asp:RegularExpressionValidator>

 protected void Page_Load(object sender, EventArgs e)
        {
            FpSpread1.NonEditModeValidation = true;
            FarPoint.Web.Spread.TextCellType tcell1 = new FarPoint.Web.Spread.TextCellType();
            tcell1.Validators.Add(RegularExpressionValidator1);
            FpSpread1.ActiveSheetView.Columns[1].CellType = tcell1;
            FpSpread1.ActiveSheetView.Columns[1].BackColor = System.Drawing.Color.AliceBlue;
            FpSpread1.ValidationErrorMessage = "test";
        }
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator" ValidationExpression="\d{5}">Enter 5 digits</asp:RegularExpressionValidator>

Protected Sub Page_Load(sender As Object, e As System.EventArgs)
            FpSpread1.NonEditModeValidation = True
            Dim tcell1 As New FarPoint.Web.Spread.TextCellType()
            tcell1.Validators.Add(RegularExpressionValidator1)
            FpSpread1.ActiveSheetView.Columns(1).CellType = tcell1
            FpSpread1.ActiveSheetView.Columns(1).BackColor = System.Drawing.Color.AliceBlue
            FpSpread1.ValidationErrorMessage = "test"
End Sub
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

Reference

FpSpread Class
FpSpread Members

 

 


Copyright © GrapeCity, inc. All rights reserved.