I'm reading about 40 dates from a database table and I would like to automatically select these dates in a radcalendar. I want the user to the de-select any days that were automatically selected, or add new days by selected them.
Here's a simple demonstration of what my code looks like using a simple loop to select days 23, 24 and 25.
Dim i As Integer
For i = 23 To 25
Dim NewDay As New Telerik.Web.UI.RadCalendarDay(RadCalendar1)
NewDay.Date =
New DateTime(2009, 7, i)
RadCalendar1.RangeMinDate = DateTime.Now
RadCalendar1.SpecialDays.Add(NewDay)
RadCalendar1.SpecialDays(NewDay).IsSelectable =
True
RadCalendar1.SpecialDays(NewDay).IsSelected =
True
RadCalendar1.SpecialDays(NewDay).ItemStyle.BackColor = Drawing.Color.Red
Next
When I do this, the calendar actually highlights the special days in red. But for some reason the IsSelected=True property is ignored. I do however think that the days are selected because when I run the mouse over them they change color to the mouse-over color. However, when I submit the calendar, NO DATES are coming up in my list of selected dates. I have to physically click each day myself and then submit before they come up.
How would I automatically select several dates and highlight them in the radcalendar and then allow the user to de-select or select more dates. I then want to a) clear all previously stored special days in the database and b) post all selected dates to the database table.
Thanks
D.