Spread ASP.NET 6.0 Product Documentation
ErrorMessage Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > GeneralCellType Class : ErrorMessage Property


Glossary Item Box

Gets or sets the error message for the cell type. This property is used by the derived classes.

Syntax

Visual Basic (Declaration) 
Public Overridable Property ErrorMessage As String
Visual Basic (Usage)Copy Code
Dim instance As GeneralCellType
Dim value As String
 
instance.ErrorMessage = value
 
value = instance.ErrorMessage
C# 
public virtual string ErrorMessage {get; set;}

Property Value

String containing the message to display for errors

Example

This example creates a spreadsheet with 7 columns and 50 rows. It then creates a GeneralCellType object and uses its ErrorMessage property to provide a message to display if the user types in invalid data. A loop assigns the cells in the first column to be general cells and places values in them.
C#Copy Code
FpSpread1.Sheets[0].ColumnCount=7;
FpSpread1.Sheets[0].PageSize=50;
FpSpread1.Sheets[0].RowCount=50;
FarPoint.Web.Spread.GeneralCellTypegenrl=newFarPoint.Web.Spread.GeneralCellType();
genrl.ErrorMessage="Youmustusenumbers!!";
inti;
for(i=0;i<=49;i++)
{
FpSpread1.Sheets[0].Cells[i,0].CellType=genrl;
FpSpread1.Sheets[0].Cells[i,0].Value=100+i;
}
Visual BasicCopy Code
FpSpread1.Sheets(0).ColumnCount=7
FpSpread1.Sheets(0).PageSize=50
FpSpread1.Sheets(0).RowCount=50
DimgenrlAsNewFarPoint.Web.Spread.GeneralCellType()
curr.ErrorMessage="Youmustusenumbers!!"
DimiAsInteger
Fori=0To49
FpSpread1.Sheets(0).Cells(i,0).CellType=genrl
FpSpread1.Sheets(0).Cells(i,0).Value=100+i
Nexti

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.