or
Do
While
dr.Read()
Dim
d
As
New
DateTime()
Dim
s
As
String
=
""
Dim
NewDay
As
New
RadCalendarDay(RadCalendar1)
'---------------------------------Date
If
Not
IsDBNull(dr(
"evnDate"
))
Then
d = dr(
"evnDate"
)
Else
d = System.DateTime.Now
End
If
NewDay.
Date
=
New
DateTime(d.Year, d.Month, d.Day)
'---------------------------------Repeat
If
Not
IsDBNull(dr(
"evnRepeats"
))
Then
s = dr(
"evnRepeats"
)
End
If
Select
Case
s
Case
"Monthly"
NewDay.Repeatable = RecurringEvents.DayAndMonth
Case
"Daily"
NewDay.Repeatable = RecurringEvents.DayInMonth
Case
"Weekly"
NewDay.Repeatable = RecurringEvents.Week
Case
""
NewDay.Repeatable = RecurringEvents.None
End
Select
'-------------------------------------Tooltip
If
Not
IsDBNull(dr(
"evnToolTip"
))
Then
NewDay.ToolTip = dr(
"evnToolTip"
)
End
If
'-------------------------------------TemplateID, but first Create TEmplate,
' in order to create template create div
'Dim newT As New DayTemplate()
'newT.Controls.Add(cDiv)
'newT.ID = cDiv.InnerHtml.Replace(" ", "")
'If RadCalendar1.CalendarDayTemplates.Contains(newT) Then
' RadCalendar1.CalendarDayTemplates.Add(newT)
'End If
'NewDay.TemplateID = newT.ID
'RadCalendar1.SpecialDays.Add(NewDay)
Dim
cDiv
As
New
System.Web.UI.HtmlControls.HtmlGenericControl(
"DIV"
)
cDiv.Attributes(
"class"
) =
"rcTemplate rcDayMortgage"
If
Not
IsDBNull(dr(
"evnTemplateID"
))
Then
cDiv.InnerHtml = dr(
"evnTemplateID"
)
ElseIf
dr(
"evnTemplateID"
) =
""
Then
cDiv.InnerHtml =
"Calendar Entry"
Else
cDiv.InnerHtml =
"Calendar Entry"
End
If
cDiv.ID = cDiv.InnerText
Dim
template
As
New
CalendarCellContentTemplate(RadCalendar1, d, cDiv, NewDay.Repeatable)
Public
Class
CalendarCellContentTemplate
Implements
ITemplate
Private
cellContent
As
Control
Public
Sub
New
(
ByVal
calendarInstance
As
RadCalendar,
ByVal
cellDate
As
DateTime,
ByVal
cellContent
As
Control, _
ByVal
repeat
As
Telerik.Web.UI.Calendar.RecurringEvents)
Dim
spec
As
RadCalendarDay
Me
.cellContent = cellContent
spec = calendarInstance.SpecialDays(calendarInstance.SpecialDays.IndexOf(cellDate))
If
spec
Is
Nothing
Then
spec =
New
RadCalendarDay()
spec.
Date
= cellDate
spec.TemplateID =
"BirthdayTemplate"
calendarInstance.SpecialDays.Add(spec)
End
If
Dim
template
As
New
DayTemplate
template.ID = cellContent.ID
template.Content =
Me
spec.Repeatable = repeat
calendarInstance.CalendarDayTemplates.Add(template)
End
Sub
Public
Sub
InstantiateIn(
ByVal
container
As
System.Web.UI.Control)
Implements
System.Web.UI.ITemplate.InstantiateIn
container.Controls.Add(
Me
.cellContent)
End
Sub
End
Class
<
handlers
>
<
remove
name
=
"WebServiceHandlerFactory-Integrated"
/>
<
remove
name
=
"ScriptHandlerFactory"
/>
<
remove
name
=
"ScriptHandlerFactoryAppServices"
/>
<
remove
name
=
"ScriptResource"
/><
remove
name
=
"UrlRoutingHandler"
/>
<
add
name
=
"HtmlPages"
path
=
"*.html"
verb
=
"*"
modules
=
"IsapiModule"
scriptProcessor
=
"%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"
resourceType
=
"Unspecified"
preCondition
=
"classicMode,runtimeVersionv2.0,bitness32"
/>
<
add
name
=
"Exececute Xml Package"
preCondition
=
"integratedMode"
path
=
"execpackage.aspx"
verb
=
"*"
type
=
"ExecXmlPackage"
/>
<
add
name
=
"Chart Image Handler"
path
=
"ChartImage.axd"
verb
=
"*"
preCondition
=
"integratedMode"
type
=
"Telerik.Web.UI.ChartHttpHandler"
/>
<
add
name
=
"Telerik_Web_UI_DialogHandler_aspx"
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
/>
<
add
name
=
"Telerik.ReportViewer.axd_*"
path
=
"Telerik.ReportViewer.axd"
verb
=
"*"
type
=
"Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=4.2.10.1110, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_Web_UI_WebResource_axd"
verb
=
"*"
preCondition
=
"integratedMode"
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource,Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
/>
<
add
name
=
"ScriptHandlerFactory"
verb
=
"*"
path
=
"*.asmx"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"ScriptHandlerFactoryAppServices"
verb
=
"*"
path
=
"*_AppService.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"ScriptResource"
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"UrlRoutingHandler"
verb
=
"*"
path
=
"UrlRouting.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/></
handlers
>
Colleagues,
Who knows if it is possible to add a horizontal line showing the actual time to the RadScheduler for ASP.NET? It must move from top to bottom, as time passes, similar to what we can see in the Outlook’s calendar?
Regards,
- Stepan.