By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,809 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Inserting values in calendarcolumn in 2010

P: 1
Hi everyone I encountered the same problem below and the solution also worked for me but it only work once after i refreshed the datagridview i found that i cannot use the calendar dropdown any more

all answers are appriciated


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

Any suggestions?

Thanks Arne
Feb 15 '07 #1
Post Reply
Share this Question
Share on Google+
2 Replies

P: n/a
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.Insert(loc, col)

Clay Burch
Syncfusion, Inc.
Apr 23 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.