host datetime picker in a datagridview

I wanted to place a datetimepicker in the 4th column of my datagridview..How can i do this..I tried some sample code from msdn...everything woked fine when i tried to run it.....but when i added the same code to my application, which already has a datagrid view...the visual studio designer generated an error..
"The service System.Windows.Forms.Design.ISelectionUIService already exists in the service container. Parameter name"
yuvaratnaAsked:
Who is Participating?
 
Priest04Connect With a Mentor Commented:
Have you gone through this article on MSDN? Its pretty self-explaining

http://msdn.microsoft.com/en-us/library/7tas5c80(vs.80).aspx

Goran
0
 
yuvaratnaAuthor Commented:
i tried that code snippet, it woked fine when i tried to run on a new form, but when i added the same code to a form that already has datagrid view, ot throwed an error "The service System.Windows.Forms.Design.ISelectionUIService already exists in the service container. Parameter name " 
0
 
Priest04Commented:
Which part of the code have you pasted on this existing form?
0
 
yuvaratnaAuthor Commented:
i pasted the whole code...the visual studio designer ois causing a problem, because there might be a datagrid view which is added dynamically to the form...and as i already have a datagrid view on the form..it might be throwing the error...

when i tried to run the samne code on a new form, it is working perfectly!
0
 
Priest04Commented:
What is the name of this form and datagridview control that is already on the form?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.