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


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

Glossary Item Box

Creates a new date-time cell with the specified error message.

Syntax

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

Parameters

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

Example

The following example creates a date-time cell with a message to display for invalid data and a custom date format. The date format displays the weekday, a comma, and then the month and day for the specified date. The column width is set to display all the text.
Visual BasicCopy Code
DimdatecellAsNewFarPoint.Web.Spread.DateTimeCellType("Needadate!!")
datecell.FormatString="d"
FpSpread1.Sheets(0).Cells(0,0).CellType=datecell
FpSpread1.Sheets(0).Cells(0,0).Value=System.DateTime.Now.ToOADate()
FpSpread1.Sheets(0).Columns(0).Width=175
C#Copy Code
FarPoint.Web.Spread.DateTimeCellTypedatecell=newFarPoint.Web.Spread.DateTimeCellType("Needadate!!");
datecell.FormatString="d";
FpSpread1.Sheets[0].Cells[0,0].CellType=datecell;
FpSpread1.Sheets[0].Cells[0,0].Value=System.DateTime.Now.ToOADate();
FpSpread1.Sheets[0].Columns[0].Width=175;

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.