Spread ASP.NET 6.0 Product Documentation
RegExpCellType Constructor()
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > RegExpCellType Class > RegExpCellType Constructor : RegExpCellType Constructor()


Glossary Item Box

Creates a new regular expression cell.

Syntax

Visual Basic (Declaration) 
Public Function New()
Visual Basic (Usage)Copy Code
Dim instance As New RegExpCellType()
C# 
public RegExpCellType()

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();
re.ErrorMessage = "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()
re.ErrorMessage = "SSN ( ex, 123-45-6789 )"
re.ValidationExpression = "^\d{3}-\d{2}-\d{4}$"
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = re

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.