Spread for ASP.NET 7.0 Product Documentation
RegExpCellType Constructor(String)
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > RegExpCellType Class > RegExpCellType Constructor : RegExpCellType Constructor(String)


errorMessage
Message (as string) to display if the input value is not valid

Glossary Item Box

Creates a new regular expression cell with the specified message to display.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal errorMessage As String _
)
Visual Basic (Usage)Copy Code
Dim errorMessage As String
 
Dim instance As New RegExpCellType(errorMessage)
C# 
public RegExpCellType( 
   string errorMessage
)

Parameters

errorMessage
Message (as string) to display if the input value is not valid

Example

This example creates a regular expression cell type (RegExpCellType object) and assigns it to the first cell in the sheet. Its ErrorMessage has been added in the constuctor. The ValidationExpression property has also been set. So if the user enters data that does not conform to the regular expression, a warning appears.
C#Copy Code
FarPoint.Web.Spread.RegExpCellType re = new FarPoint.Web.Spread.RegExpCellType("SSN ( ex, 123-45-6789 )");
re.ValidationExpression = "^\\d{3}-\\d{2}-\\d{4}$";
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = re;
Visual BasicCopy Code
Dim re As New FarPoint.Web.Spread.RegExpCellType("SSN ( ex, 123-45-6789 )")
re.ValidationExpression = "^\d{3}-\d{2}-\d{4}$"
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = re

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.