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

I have two queries related Winforms controls, which are following explained:

1). I want to add DateTimePicker in DataGridViewColoumn (I have already read the article http://msdn.microsoft.com/en-us/library/7tas5c80.aspx[^] please tell another one.).

2). I have placed the Month Calendar Control in my Winforms. I want to change the back color of date which are available in database.

Regards!
Aman
Posted
Updated 4-Apr-11 7:25am
v2
Comments
Aman4.net 6-Apr-11 10:14am    
Finally I used http://msdn.microsoft.com/en-us/library/7tas5c80.aspx for DateTimePicker column.

1 solution

Another reference for datetime picker in gridview review this link;

Windows DataGridColumns User Controls[
title="New Window">^
]

for the second question this is a good link to start with;

changing the background color of the calendar control[^]

you should take a look at Calendar.SelectedDates and Calendar.SelectedDayStyle properties

colorMyCalendar.SelectedDates.Add({DateTime object}); 
colorMyCalendar.SelectedDayStyle.BackColor = System.Drawing.Color.Yellow; 


If you want to color specific dates in the month, then you should take a look at Calendar.DayRender Event.
 
Share this answer
 

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