DateTimePicker in DataGrid?

nickcherryjiggzvan

New member
Joined
Jul 10, 2008
Messages
2
Programming Experience
Beginner
How would one go about adding a DateTimePicker to a DataGrid? I'm creating all the columns dynamically and am getting hung up here:

startDateColumn = New System.Data.DataColumn(START_DATE_HEADER, System.Type.GetType("System.DateTimePicker"))

Any help would be greatly appreciated!
 
Being as you are on .Net 2.0 you should use the DataGridView control and not the older DataGrid control. DataColumn also is at data layer and not UI. Creating custom type control cells is way easier with DGV than DG, there is the How to: Host Controls in Windows Forms DataGridView Cells article that show an example of this, and lucky for you it is exactly the DTP control that is used.
 
Back
Top