Spread Windows Forms 9.0 Product Documentation > Developer's Guide > Customizing Interaction with Cell Types > Working with Editable Cell Types > Setting a GcNumber Cell |
You can create a number cell that displays a side button and calculator. The GcNumberCellType cell is part of the GrapeCity.Win.PluginInputMan assembly.
Select the side button to display the drop-down calculator as shown in the following image. Select OK to close the calculator.
You can specify whether to display 0 if the cell value is null with the AllowDeleteToNull property.
You can display the pop-up calculator using the Ctrl key and the add, subtract, multiply, or divide key on the number pad while the cell is in edit mode. Press Enter to finish the calculation and accept the value. The following image displays the pop-up calculator.
For a complete list of properties, see the GcNumberCellType class.
This example creates a GcNumber cell.
C# |
Copy Code
|
---|---|
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType ncell = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType(); fpSpread1.Sheets[0].Cells[0, 0].CellType = ncell; |
VB |
Copy Code
|
---|---|
Dim ncell As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType() FpSpread1.Sheets(0).Cells(0, 0).CellType = ncell |
Or right-click on the cell or cells and select Cell Type. From the list, select GcNumber. In the CellType editor, set the properties you need. Click Apply.