Spread for ASP.NET 7.0 Product Documentation
EditMode Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > DateTimeCellType Class : EditMode Property


Glossary Item Box

Gets the format setting of a cell type in edit mode.

Syntax

Visual Basic (Declaration) 
Public Shadows ReadOnly Property EditMode As DateTimeCellType.EditModeSettings
Visual Basic (Usage)Copy Code
Dim instance As DateTimeCellType
Dim value As DateTimeCellType.EditModeSettings
 
value = instance.EditMode
C# 
public new DateTimeCellType.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.

Example

This example sets a format for edit mode.
C#Copy Code
protected void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack) return;
FarPoint.Web.Spread.DateTimeCellType dct = new FarPoint.Web.Spread.DateTimeCellType();
dct.DateTimeFormat = new System.Globalization.DateTimeFormatInfo();
dct.FormatString = "yyyy/MM/dd";
dct.EditMode.DateTimeFormat = new System.Globalization.DateTimeFormatInfo();
dct.EditMode.FormatString = "yyyy.MM.dd";
FpSpread1.Sheets[0].Columns[1].CellType = dct;
}
VB.NETCopy Code
protected void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack) return;
FarPoint.Web.Spread.DateTimeCellType dct = new FarPoint.Web.Spread.DateTimeCellType();
dct.DateTimeFormat = new System.Globalization.DateTimeFormatInfo();
dct.FormatString = "yyyy/MM/dd";
dct.EditMode.DateTimeFormat = new System.Globalization.DateTimeFormatInfo();
dct.EditMode.FormatString = "yyyy.MM.dd";
FpSpread1.Sheets[0].Columns[1].CellType = dct;
}

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

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.