Visual Basic (Declaration) | |
---|---|
Public Property DateTimeFormat As DateTimeFormatInfo |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As DateTimeCellType.EditModeSettings Dim value As DateTimeFormatInfo instance.DateTimeFormat = value value = instance.DateTimeFormat |
C# | |
---|---|
public DateTimeFormatInfo DateTimeFormat {get; set;} |
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.
This example sets a format for edit mode.
C# | ![]() |
---|---|
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.NET | ![]() |
---|---|
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If (IsPostBack) Then Return End If Dim dct As 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 End Sub |
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