468,132 Members | 1,585 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,132 developers. It's quick & easy.

Datagridview Calendar Column

I've downloaded some code relative to establishing a column on my
DataGridView which allows me to use the DateTimePicker. So far so good. If I
add a column using
dim col as new CalendarColumn
the grid works great. However...I need to assign an existing column ...
from a database. How do I make datagridview1.columns("NoteDate") my
CalendarColumn?

Any suggestions?

Thanks Arne
Feb 15 '07 #1
2 10014
Here is one way you can do it.

Dim col As New CalendarColumn()
col.DataPropertyName = "NoteDate"
col.HeaderText = "Headertext"
Dim loc As Integer =
dataGridView1.Columns.IndexOf(dataGridView1.Column s("NoteDate"))
dataGridView1.Columns.RemoveAt(loc)
dataGridView1.Columns.Insert(loc, col)

================
Clay Burch
Syncfusion, Inc.

Feb 15 '07 #2
That worked great...thanks
"ClayB" wrote:
Here is one way you can do it.

Dim col As New CalendarColumn()
col.DataPropertyName = "NoteDate"
col.HeaderText = "Headertext"
Dim loc As Integer =
dataGridView1.Columns.IndexOf(dataGridView1.Column s("NoteDate"))
dataGridView1.Columns.RemoveAt(loc)
dataGridView1.Columns.Insert(loc, col)

================
Clay Burch
Syncfusion, Inc.

Feb 15 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by mark carew | last post: by
7 posts views Thread by Mitchell S. Honnert | last post: by
reply views Thread by =?Utf-8?B?QXJuZSBCZXJ1bGRzZW4=?= | last post: by
6 posts views Thread by Miro | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.