473,395 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Inserting values in calendarcolumn in vb.net 2010

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

Thanks



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
Post Reply
Share this Question
Share on Google+
2 Replies


ClayB
P: n/a
ClayB
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.
Apr 23 '14 #1
0 946

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

Similar topics

1
by: pmud | last post by:
I have an ASP.NET web application using C# code. I am trying to insert values from a web form into an SQL database. I am using SQL COMMAND object for this. I need to know HOW TO INSERT THE RADIO...
1
by: ram achar | last post by:
please send me C# code for inserting values into database sql server2005 *** Sent via Developersdex http://www.developersdex.com ***
9
by: Bunty | last post by:
I am not beginer of this language. I've worked on this language for 2 or 3 months.But now i have a problem to inserting values in the database.It gives me error that DATABASE NOT SELECTED. I am...
6
by: Bunty | last post by:
I want to insert values in the database.If i insert values one by one then it works till 4 or 5 fields then after it gives error.In my database there are more than 20 field.Pls help me.
9
by: i12know | last post by:
Hi guys, I had some problem inserting values a structure array in C++. I had define for example struct UNITS { unsigned char VariableA; unsigned char VariableB; // the...
1
by: arvindmishra | last post by:
i m inserting values in access database it displays message value is inserted but value is not ptresent in database. I m using following code OleDbConnection cnn = new OleDbConnection(); ...
2
by: 315hughes | last post by:
Hi i am trying to read from a text file and enter this into a table.The text file contains just 3 didget numbers sepearted by a line to distingues a new number. The table consists of 2 columns called...
1
by: Groom | last post by:
Hi I need help inserting value in different fields. So lets say I have: Three field names: ID-number Next field name is Journey
5
by: Ankit Diwan | last post by:
when i try to connect php script to MySQL for creating & inserting values in a table i get an error msg: Error creating database: Can't create database 'mi_db'; database existsAccess denied for user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.