Spread ASP.NET 14
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / CurrencyCellType Class / EditMode Property
Example


In This Topic
    EditMode Property (CurrencyCellType)
    In This Topic
    Gets the format setting of a cell type in edit mode.
    Syntax
    'Declaration
     
    Public Shadows ReadOnly Property EditMode As CurrencyCellType.EditModeSettings
    'Usage
     
    Dim instance As CurrencyCellType
    Dim value As CurrencyCellType.EditModeSettings
     
    value = instance.EditMode
    public new CurrencyCellType.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.CurrencyCellType cct = new FarPoint.Web.Spread.CurrencyCellType();
    cct.EditMode.NumberFormat = new System.Globalization.NumberFormatInfo();
    cct.EditMode.NumberFormat.CurrencySymbol = "VND";
    cct.NumberFormat = new System.Globalization.NumberFormatInfo();
    cct.NumberFormat.CurrencySymbol = "D";
    FpSpread1.Sheets[0].Columns[1].CellType = cct;
    FpSpread1.Sheets[0].Cells[0, 1].Value = 10;
    }
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If (IsPostBack) Then
        Return
    End If
    Dim cct As New FarPoint.Web.Spread.CurrencyCellType()
    cct.EditMode.NumberFormat = New System.Globalization.NumberFormatInfo()
    cct.EditMode.NumberFormat.CurrencySymbol = "VND"
    cct.NumberFormat = New System.Globalization.NumberFormatInfo()
    cct.NumberFormat.CurrencySymbol = "D"
    FpSpread1.Sheets(0).Columns(1).CellType = cct
    FpSpread1.Sheets(0).Cells(0, 1).Value = 10
    End Sub
    See Also