Hi
I'm trying to retrieve a list of special days held in a table on an SQL server and use those dates as Special Days - how do I do this? I can retrieve the dates into, say, a dataset or gridview but I'm unclear how to then add these as Special Days at run time.
Also I have some code I found that completely disables Sundays on the calendar. How can I adapt this so the same applies to any Special Days? I ask because the code completely greys out Sundays yet Special Days are still 'clickable' and I want them to also be greyed out.
Here's the code:
Thanks for any help
Dan
I'm trying to retrieve a list of special days held in a table on an SQL server and use those dates as Special Days - how do I do this? I can retrieve the dates into, say, a dataset or gridview but I'm unclear how to then add these as Special Days at run time.
Also I have some code I found that completely disables Sundays on the calendar. How can I adapt this so the same applies to any Special Days? I ask because the code completely greys out Sundays yet Special Days are still 'clickable' and I want them to also be greyed out.
Here's the code:
Dim
calTable
As
Telerik.WinControls.UI.CalendarTableElement = TryCast(RadCalendar1.RootElement.Children(0).Children(0).Children(2).Children(0).Children(1), Telerik.WinControls.UI.CalendarTableElement)
If
calTable IsNot
Nothing
Then
For
Each
cell
As
Telerik.WinControls.UI.CalendarCellElement
In
calTable.Children
If
(cell.[
Date
].DayOfWeek = DayOfWeek.Sunday)
Then
cell.Enabled =
False
End
If
Next
End
If
Thanks for any help
Dan