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


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

Glossary Item Box

Creates a new currency cell with the specified message to display.

Syntax

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

Parameters

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

Example

This example creates a spreadsheet with 7 columns and 50 rows. It then creates a CurrencyCell object with a message to display if the user enters invalid data. A loop assigns the cells in the first column to be currency 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.CurrencyCellType curr = new FarPoint.Web.Spread.CurrencyCellType("You must use numbers!!");
    int i;
    for (i = 0; i <=49; i++)
    {
      FpSpread1.Sheets[0].Cells[i, 0].CellType = curr;
      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
    Dim curr As New FarPoint.Web.Spread.CurrencyCellType("You must use numbers!!")
    Dim i As Integer
    For i = 0 To 49
       FpSpread1.Sheets(0).Cells(i, 0).CellType = curr
       FpSpread1.Sheets(0).Cells(i, 0).Value = 100 + i
    Next i

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.