Spread ASP.NET 15
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / FpSpread Class / NonEditModeValidation Property
Example


In This Topic
    NonEditModeValidation Property
    In This Topic
    Gets or sets whether to perform validation when Spread in non-editing state.
    Syntax
    'Declaration
     
    Public Property NonEditModeValidation As Boolean
    'Usage
     
    Dim instance As FpSpread
    Dim value As Boolean
     
    instance.NonEditModeValidation = value
     
    value = instance.NonEditModeValidation
    public bool NonEditModeValidation {get; set;}
    Example
    This example sets the NonEditModeValidation property.
    <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
    See Also