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


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > DateTimeCellType Class > DateTimeCellType Constructor : DateTimeCellType Constructor(DateTimeCellType)
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
See Also

Reference

DateTimeCellType Class
DateTimeCellType Members
Overload List