Spread ASP.NET 18
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / DateTimeCellType Class / ErrorMessage Property
Example


In This Topic
    ErrorMessage Property (DateTimeCellType)
    In This Topic
    Gets or sets the error message for the cell type.
    Syntax
    'Declaration
     
    
    Public Overrides Property ErrorMessage As String
    'Usage
     
    
    Dim instance As DateTimeCellType
    Dim value As String
     
    instance.ErrorMessage = value
     
    value = instance.ErrorMessage
    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.
    FarPoint.Web.Spread.DateTimeCellTypedatecell=new FarPoint.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;
    Dim datecell As New FarPoint.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
    See Also