Hi NateZilla,
Do you mean the DataGridViewDateTimePickerColumn used in databinding mode?
I have tested the sample given by DeborahK, it works great. You can copy all the code into a cs file and use CalendarColumn this way.
Public Class Form1
Private dtSource As DataTable = New DataTable()
Public Sub New ()
InitializeComponent()
dtSource.Columns.Add("DateTimeCol" , GetType (String ))
dtSource.Rows.Add(System.DateTime.Today.ToShortDateString())
Dim calColumn As CalendarColumn = New CalendarColumn()
calColumn.DataPropertyName = "DateTimeCol"
DataGridView1.Columns.Add(calColumn)
DataGridView1.DataSource = dtSource
End Sub
End Class
Thank for DeborahK’s sharing. Hope this helps you NateZilla. If you have anything unclear, please feel free to tell me.
Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn[At]microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the
All-In-One Code Framework!