narasiman rao

narasiman rao

  • NA
  • 519
  • 771.7k

when i click the button the dateepicker date to be displayed

Jan 8 2013 1:30 AM
when i click the button the date  picker date to be displayed in the data grid view   in the rows.


  DESIGN AS FOLLOWS;


 Datepicker1                                 Datepicker2

when i choose the Datepicker1  8th as Monday in  the Datepicker2 13th Saturday will automatically display in the date picker 2.that code is working for that i written the code.

date picker code as follows;

 <private void dt_Datepicker1_ValueChanged(object sender, EventArgs e)
        {

             if (Datepicker1  .Value.DayOfWeek != DayOfWeek.Monday)
             {
                 MessageBox.Show("Please Select a MONDAY Only");
             }
             else
             {
                 Datepicker2 .Value = Datepicker1.Value.AddDays(5);
             }
                 Datepicker2 .Enabled = false;

        }

when i click the button output as  follows like this that date picker date to be displayed in the data grid view in the rows.

design  has done by using data grid view

Date       session   gs   vrv   cm   rk   ms   tms   gv  rk   mrv

8              1     
8              2
8              3
8              4

9             1
9             2
9            3
9           4

10        1
10        2
10        3
10        4

11        1
11        2
11        3
11        4

12        1
12       2
12       3
12       4

13       1
13       2
13       3
13       4