Spread for ASP.NET 11 Product Documentation
Setting a Double Cell
Spread for ASP.NET 11 Product Documentation > Developer's Guide > Customizing with Cell Types > Working with Editable Cell Types > Setting a Double Cell

You can use double (numeric value) cells to restrict users to entering double-precision floating point numbers and to display data as these numbers. You can also specify minimum and maximum values as well as the number of decimal digits.

The double cell has a default error message that is displayed if the user types an invalid value and tries to leave the cell.

You can specify an edit mode format with the EditMode property and the DoubleCellType.EditModeSettings class.

For details on the properties and methods for this cell type, refer to the DoubleCellType class.

Using Code

  1. Define the double cell type by creating an instance of the DoubleCellType class.
  2. Assign the double cell type to a cell.

Example

This example sets a cell to a double cell type.

C#
Copy Code
FarPoint.Web.Spread.DoubleCellType dblcell = new FarPoint.Web.Spread.DoubleCellType();
FpSpread1.ActiveSheetView.Cells[1, 1].CellType = dblcell; 
VB
Copy Code
Dim dblcell As New FarPoint.Web.Spread.DoubleCellType()
FpSpread1.ActiveSheetView.Cells(1, 1).CellType = dblcell 

Using the Spread Designer

  1. In the work area, select the cell or cells for which you want to set the cell type.
  2. Select the Home menu.
  3. Select the SetCellType icon under the CellType section.
  4. Select the cell type and any other cell properties.
  5. Select OK to close the dialog.
  6. Click Apply and Exit to close the Spread Designer.
See Also