Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Faculty Code Combo box(from the database all Faculty code is displayed in the combobox)

that is working fine.


Then i have one date time picker.

then i have one data grid view.


Output as follows;

when i click the date time picker that month all days will be displayed in the data grid view.

for that how can i do using c sharp.

it is window application.

Example as follows;

Date time picker i select the January month.

In data grid view output as follows;

January

1/1/2013
2/1/2013
3/1/2013
4/1/2013
5/1/2013
6/1/2013
7/1/2013
8/1/2013
9/1/2013
10/1/2013
11/1/2013
12/1/2013
13/1/2013
14/1/2013
15/1/2013
16/1/2013
17/1/2013
18/1/2013
19/1/2013
20/1/2013
21/1/2013
22/1/2013
23/1/2013
24/1/2013
25/1/2013
26/1/2013
27/1/2013
28/1/2013
29/1/2013
30/1/2013
31/1/2013
Posted

1 solution

C#
int numDays = DateTime.DaysInMonth(2013, 1);

for (int i = 1; i <= numDays; i ++)
{
  print i + "/1/2013\n";
}


modify it according to your need
 
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