If its not asking too much I would appreciate an almost click by click
desvription or a snippet of code needed to do that. The datagridview I use
is bound.
Thanks in advance for any help,
Bob
Funny you should ask. The MSDN Online Library has an article about hosting
Controls in a DataGridView, which actually uses a DateTimePicker as an
example (with full code)! :)
http://msdn2.microsoft.com/en-us/7tas5c80.aspx
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
A lifetime is made up of
Lots of short moments.
"Bob" <bdu...@sgiims.com> wrote in message
news:u8WXCyqi...@TK2MSFTNGP04.phx.gbl...
Private dataGridView1 As New DataGridView()
<STAThreadAttribute()> _
Public Shared Sub Main()
Application.Run(New Form1())
End Sub
Public Sub New()
Me.dataGridView1.Dock = DockStyle.Fill
Me.Controls.Add(Me.dataGridView1)
Me.Text = "DataGridView calendar column demo"
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) _
Handles Me.Load
Dim col As New CalendarColumn()
Me.dataGridView1.Columns.Add(col)
Me.dataGridView1.RowCount = 5
Dim row As DataGridViewRow
For Each row In Me.dataGridView1.Rows
row.Cells(0).Value = DateTime.Now
Next row
End Sub
End Class
What do I need to do to have an EXISTING datagrid and an EXISTING column
display te datetimepicker in the calendarclass.
Thanks,
Bob
"Kevin Spencer" <ke...@DIESPAMMERSDIEtakempis.com> wrote in message
news:u6mBANvi...@TK2MSFTNGP04.phx.gbl...
I'm not following you. The sample creates 3 different classes: A
DataGridViewColumn, a DataGridViewCell, and a DataGridViewEditingControl.
Once these 3 classes are created, they are used together to populate a
column of a DataGridView Control. They also work exactly like any other
DataGridViewColumn Control, in that you really only work with the Column for
the most part, such as adding a Column to the Columns Collection, unless you
are working with individual Cells in a Row, in which case, you work with the
Cell. But in any case, you can set the value on a per-Cell basis the same
way you would with any other DataGridViewColumn-derived Control. There's no
difference.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
A lifetime is made up of
Lots of short moments.
"Bob" <bdu...@sgiims.com> wrote in message
news:Orjld4Ij...@TK2MSFTNGP03.phx.gbl...