Gets or sets the error message for the cell type.
Syntax
Visual Basic (Declaration) | |
---|
Public Overrides Property ErrorMessage As String |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As DateTimeCellType
Dim value As String
instance.ErrorMessage = value
value = instance.ErrorMessage |
C# | |
---|
public override string ErrorMessage {get; set;} |
Property Value
String containing the message
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.
C# | Copy Code |
---|
FarPoint.Web.Spread.DateTimeCellTypedatecell=newFarPoint.Web.Spread.DateTimeCellType();
datecell.ErrorMessage="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; |
Visual Basic | Copy Code |
---|
DimdatecellAsNewFarPoint.Web.Spread.DateTimeCellType()
datecell.ErrorMessage="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