Spread for ASP.NET 8.0 Product Documentation
EditMode Property (DoubleCellType)
Example 


Gets the format setting of a cell type in edit mode.
Syntax
'Declaration
 
Public Shadows ReadOnly Property EditMode As DoubleCellType.EditModeSettings
'Usage
 
Dim instance As DoubleCellType
Dim value As DoubleCellType.EditModeSettings
 
value = instance.EditMode
public new DoubleCellType.EditModeSettings EditMode {get;}
Remarks
If the EditMode property is set and the user enters edit mode in the cell, the value is displayed in the editor using the edit mode format. If the EditMode property is set and the user leaves edit mode in the cell, the value is converted to the display format if it is valid. If the EditMode property is not set, the display format is applied after the cell is updated (default behavior).
Example
This example sets a format for edit mode.
protected void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack) return;
FarPoint.Web.Spread.DoubleCellType dbct = new FarPoint.Web.Spread.DoubleCellType();
dbct.NumberFormat = new System.Globalization.NumberFormatInfo();
dbct.NumberFormat.NumberDecimalDigits = 4;
dbct.NumberFormat.NumberDecimalSeparator = ".";
dbct.EditMode.NumberFormat = new System.Globalization.NumberFormatInfo();
dbct.EditMode.NumberFormat.NumberDecimalSeparator = "?";
dbct.EditMode.DecimalDigits = 5; 
FpSpread1.Sheets[0].Columns[1].CellType = dbct;
}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If (IsPostBack) Then
    Return
End If
Dim dbct As New FarPoint.Web.Spread.DoubleCellType()
dbct.NumberFormat = New System.Globalization.NumberFormatInfo()
dbct.NumberFormat.NumberDecimalDigits = 4
dbct.NumberFormat.NumberDecimalSeparator = "."
dbct.EditMode.NumberFormat = New System.Globalization.NumberFormatInfo()
dbct.EditMode.NumberFormat.NumberDecimalSeparator = "?"
dbct.EditMode.DecimalDigits = 5
FpSpread1.Sheets(0).Columns(1).CellType = dbct
End Sub
Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

DoubleCellType Class
DoubleCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.