473,765 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to convert an existing bound column to use a datetime picker

Bob
I saw the example at http://msdn2.microsoft.com/en-us/library/7tas5c80.aspx
However that deals with a simple unbound column that's created on the fly.

I have an existing datagrid view column - named colDateActivati on to which
in which I need to embed the use of a date time picker.

the code sinppet that does that in the sample is in the sample's form1 form
load event is

Dim col As New CalendarColumn( )
Me.dataGridView 1.Columns.Add(c ol)

I guess in my case I would need to replace the
Me.dataGridView 1.Columns.Add(c ol) with something else but I can't get my
finger on it.

Any help would be appreciated, I've been at this for a few dauys now and I
really would like to move forward.

Bob

Jun 17 '06 #1
1 2315
Bob,

You need to remove the colDateActivati on and add it back to the
datagridview as a datetime column. There is an example on how to change a
column to a combobox column on the vb-tips website

http://www.vb-tips.com/default.aspx?...a-62c7a184f472

Ken
------------------------------

"Bob" wrote:
I saw the example at http://msdn2.microsoft.com/en-us/library/7tas5c80.aspx
However that deals with a simple unbound column that's created on the fly.

I have an existing datagrid view column - named colDateActivati on to which
in which I need to embed the use of a date time picker.

the code sinppet that does that in the sample is in the sample's form1 form
load event is

Dim col As New CalendarColumn( )
Me.dataGridView 1.Columns.Add(c ol)

I guess in my case I would need to replace the
Me.dataGridView 1.Columns.Add(c ol) with something else but I can't get my
finger on it.

Any help would be appreciated, I've been at this for a few dauys now and I
really would like to move forward.

Bob

Jun 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
67390
by: Loi Tan Vo | last post by:
Hi, I have a text file that contains a date column. The text file will be imported to database in SQL 2000 server. After to be imported, I want to convert the date column to date type. For ex. the text file look like Name date Smith 20003112
19
7287
by: Lauren Quantrell | last post by:
I have a stored procedure using Convert where the exact same Convert string works in the SELECT portion of the procedure but fails in the WHERE portion. The entire SP is listed below. Specifically, I have a problem with this portion in the WHERE clause: DATEADD(Day,tblMyEventTableName.ReminderDays, @DateNow) Between CONVERT(smalldatetime,str(DATEPART(Month, @DateNow)+1) + '/' + str(DATEPART(Day, tblMyEventTableName.TaskDateTime)) + '/'...
3
2037
by: Billy Jacobs | last post by:
I have created a DataGridColumnDatePicker Component so that I can put a datetimepicker control in my datagrid. It almost works. When I put my mouse in the cell it changes to a datetimepicker control. I can then select a date which displays in the cell. When I leave the cell however I get the following error:
0
1538
by: Ata Ýsmet Özçelik | last post by:
Hi there, I have a problem with the DateTime picker.. I want to use my custom format; for this I can give a string for the format.But My goal is to have the month name in the box in upper case like this when the item is selected : 02 JAN 2004 I know that there is an array called AbbreviatedMonthNames that can be modified. The problem is that array is used only in the CurrentCulture and can be displayed when the DateTime Format is...
4
1610
by: Raed Sawalha | last post by:
i have datagrid , I added a bound column and I need to map it with two data fields ...is this possible? <asp:datagrid id=dgInbox runat="server" EnableViewState="False" AutoGenerateColumns="False" AllowSorting="True" Width="100%"> <ItemStyle Wrap="False" BorderWidth="11px" BorderStyle="Solid" CssClass="tableCell"></ItemStyle> <HeaderStyle Height="26px" CssClass="tableHeaderCell"></HeaderStyle> <Columns> <asp:BoundColumn...
0
1418
by: Randall Parker | last post by:
I realize that methods like DateTime.ToLocalTime() and DateTime.ToUniveralTime() exist. But suppose one wants to query out data from a database that has UTC times in it. Suppose one wants to have a DataGrid with BoundColumn rows that are dates and times. Can one somehow in specifying the formatting for a date column say "date the bound date and treat it as UTC and convert it to PST when the page is rendered"? Or does one have to go thru...
5
3790
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public List<RoleData> GetRoles() { return GetRoles(null, false); }
5
3491
by: Michel Posseth [MCP] | last post by:
Hello we have encountered the following problems with the date time picker control A : datetime picker control gives focus to last entered field when moving back and forward with focus how do we reset this to the first field ? B : datetime picker in DD-MM-YYYY default format ( europe , NL-NL localization ) refuses an entry of 31 on the DD filed cause the month is already chosen to the current mont ( (02) februari wich only has 28...
1
2330
by: sonubaba | last post by:
hello, my question is, in my web application i need datetime picker control in which user can select both date and time from DateTime Picker control i could not find this anywhere on inter net pl give me suggestion and give me datetime picker control and its coding
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10008
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.