Topic for the windows application in month calendar control
sir ,I want to add holiday in month calendar in windows application in c#. When i click the calendar cell to display the value in datagridview.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vasu GadhiyaPosted Jul 12, 2014, 2:50 AM
------------------
DataTable dt = new DataTable();
DataColumn dc = dt.Columns.Add("Dates", typeof(string));
DataRow dr = dt.NewRow();
dr[0] = monthCalendar1.SelectionRange.Start.ToString("dd-MM-yyyy");
dt.Rows.Add(dr);
DataRow dr2 = dt.NewRow();
dr2[0] = monthCalendar1.SelectionRange.End.ToString("dd-MM-yyyy");
dt.Rows.Add(dr2);
dataGridView1.DataSource = dt;
------------------