Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I need to add date time picker to datagridview .... I coded like following inside the datagridview

it's not working and need to insert to date column of datagridview using add button

kindly support me

C#
DateTime curDate;
if (DateTime.TryParse(row.Cells[3].Value.ToString(), out curDate))
{
    dateTimePicker1.Value = curDate;
}
Posted

Please have a look on the bellow link :
Generic DataGridView V2.0[^]
 
Share this answer
 
refer below link which demonstrate how to add datetime picker in gridview:-
Windows DataGridColumns User Controls[^]
 
Share this answer
 
Comments
Asa code 10-Jan-14 5:32am    
yeah this is good solution but in my case it's different my datatimepicker is on form and datagridview has column called date .... so I need to add date after click on add button
Any help regarding that?

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900