Spread Windows Forms 10.0 Product Documentation
DateTimeCellType Constructor(DateTimeCellType)
Example 


Specified date-time cell type from which to copy
Creates a new copy from the specified cell type ("Copy constructor").
Syntax
'Declaration
 
Public Function New( _
   ByVal g As DateTimeCellType _
)
'Usage
 
Dim g As DateTimeCellType
 
Dim instance As New DateTimeCellType(g)
public DateTimeCellType( 
   DateTimeCellType g
)

Parameters

g
Specified date-time cell type from which to copy
Example
This example creates a date time cell.
FarPoint.Win.Spread.CellType.DateTimeCellType datecell = new FarPoint.Win.Spread.CellType.DateTimeCellType();            
datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime;           
fpSpread1.Sheets[0].Cells[1, 1].CellType = datecell;
fpSpread1.Sheets[0].Cells[1, 1].Value = System.DateTime.Now;
fpSpread1.Sheets[0].Cells[1, 0].CellType = new FarPoint.Win.Spread.CellType.DateTimeCellType(datecell);
fpSpread1.Sheets[0].Cells[1, 0].Value = System.DateTime.Now;
Dim datecell As New FarPoint.Win.Spread.CellType.DateTimeCellType()
datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime
FpSpread1.Sheets(0).Cells(1, 1).CellType = datecell
FpSpread1.Sheets(0).Cells(1, 1).Value = System.DateTime.Now
FpSpread1.Sheets(0).Cells(1, 0).CellType = New FarPoint.Win.Spread.CellType.DateTimeCellType(datecell)
FpSpread1.Sheets(0).Cells(1, 0).Value = System.DateTime.Now
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

DateTimeCellType Class
DateTimeCellType Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.