Home - Forums-.NET - FlyGrid.Net (Windows Forms) - DateTimePicker date not being displayed...

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

DateTimePicker date not being displayed...
Link Posted: 23-Jan-2006 11:51
For some reason when I choose a date from the datetimepicker in the example it does not display the date within the cell, can you help and point out what, if anything I have done wrong.

Thank you

Simon

Download Here
Link Posted: 23-Jan-2006 16:45
You've not defined DataColumn.DataType for this column:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  Dim col As Column
  For Each col In Me.FlyGrid.Columns.Items
    Dim dc As DataColumn = New DataColumn(col.FieldName)
    If (col.FieldName = "DateTimeColumn2") Then
      dc.DataType = System.Type.GetType("System.DateTime")
    End If
    dataTable.Columns.Add(dc)
  Next
End Sub