Spread for ASP.NET 10 Product Documentation
ErrorMessage Property (GeneralCellType)
Example 


Gets or sets the error message for the cell type. This property is used by the derived classes.
Syntax
'Declaration
 
Public Overridable Property ErrorMessage As String
'Usage
 
Dim instance As GeneralCellType
Dim value As String
 
instance.ErrorMessage = value
 
value = instance.ErrorMessage
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.
FpSpread1.Sheets[0].ColumnCount=7;
FpSpread1.Sheets[0].PageSize=50;
FpSpread1.Sheets[0].RowCount=50;
FarPoint.Web.Spread.GeneralCellType genrl=new FarPoint.Web.Spread.GeneralCellType();
genrl.ErrorMessage="You must use numbers!!";
int i;
for(i=0;i<=49;i++)
{
FpSpread1.Sheets[0].Cells[i,0].CellType=genrl;
FpSpread1.Sheets[0].Cells[i,0].Value=100+i;
}
FpSpread1.Sheets(0).ColumnCount=7
FpSpread1.Sheets(0).PageSize=50
FpSpread1.Sheets(0).RowCount=50
Dim genrl As New FarPoint.Web.Spread.GeneralCellType()
genrl.ErrorMessage="You must use numbers!!"
Dim i As Integer
For i = 0 To 49
FpSpread1.Sheets(0).Cells(i,0).CellType=genrl
FpSpread1.Sheets(0).Cells(i,0).Value=100+i
Next i
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

GeneralCellType Class
GeneralCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.