Reminder in Telerik calendar

In this blog let us see about how to mark special days in Telerik calendar. First drag the radcalender from tool bar and write the below code in form load event.
 

OleDbCommand oc = new OleDbCommand("select * from Table1", con); 

OleDbDataAdapter da = new OleDbDataAdapter(oc);

DataTable dt = new DataTable();

da.Fill(dt);

//Here specify the calender day to mark

Telerik.WinControls.UI.RadCalendarDay day = new Telerik.WinControls.UI.RadCalendarDay();

for (int i = 0; i < dt.Rows.Count; i++)

{

    DateTime year = Convert.ToDateTime(dt.Rows[i]["dob"]);

    int year1 = (int)year.Year;

    int month1 = (int)year.Month;

    int day1 = (int)year.Day;

    //the date to mark

    day.Date = new DateTime(year1, month1, day1, 0, 0, 0, 0);

    day.Recurring = Telerik.WinControls.UI.RecurringEvents.DayInMonth;

    day.Selectable = false;

    //add the specia day

    radCalendar1.SpecialDays.Add(day);

}

Ebook Download
View all
Learn
View all