Hi guys,
I have a scheduler defined like this:
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
Skin
=
"Windows7"
AllowDelete
=
"False"
AllowInsert
=
"False"
AllowEdit
=
"False"
SelectedView
=
"MonthView"
Culture
=
"en-GB"
LastDayOfWeek
=
"Friday"
FirstDayOfWeek
=
"Monday"
ShowFooter
=
"False"
ShowAllDayRow
=
"false"
EnableRecurrenceSupport
=
"False"
AdvancedForm-Enabled
=
"False"
OverflowBehavior
=
"Expand"
RowHeight
=
"35px"
>
<
DayView
UserSelectable
=
"true"
/>
<
WeekView
UserSelectable
=
"true"
ShowAllDayInsertArea
=
"False"
ShowInsertArea
=
"False"
>
</
WeekView
>
<
MonthView
UserSelectable
=
"true"
MinimumRowHeight
=
"3"
/>
<
MultiDayView
UserSelectable
=
"false"
/>
<
TimelineView
UserSelectable
=
"false"
/>
<
YearView
UserSelectable
=
"false"
/>
</
telerik:RadScheduler
>
I bind the appointents, and with the TimeSlotCreated hook I create special days for the holidays:
Protected
Sub
RadScheduler1_TimeSlotCreated(sender
As
Object
, e
As
TimeSlotCreatedEventArgs)
Handles
RadScheduler1.TimeSlotCreated
Dim
añoInicial
As
Integer
= Today.Year
Dim
añoFinal
As
Integer
= Today.Year + 2
Dim
dicNonLaborDays
As
Dictionary(Of
Date
,
String
) = clsDataBaseFunctions.GetNonLaborDays(añoInicial, añoFinal)
For
Each
fiesta
In
dicNonLaborDays
If
DateTime.Compare(e.TimeSlot.Start.[
Date
], fiesta.Key) = 0
Then
'Set the CssClass property to visually distinguish your special days.
e.TimeSlot.CssClass =
"Disabled"
Dim
lblNombreFiesta
As
New
Label
lblNombreFiesta.Text = fiesta.Value
If
Not
IsNothing(e.TimeSlot.Control)
Then
'Si es Nothing es porque hay un appointment en esa fecha
Select
Case
RadScheduler1.SelectedView
Case
SchedulerViewType.DayView
e.TimeSlot.Control.Controls.AddAt(1, lblNombreFiesta)
Case
SchedulerViewType.WeekView
e.TimeSlot.Control.Controls.AddAt(1, lblNombreFiesta)
Case
SchedulerViewType.MonthView
e.TimeSlot.Control.Controls.AddAt(1, lblNombreFiesta)
End
Select
End
If
End
If
Next
' Resaltar la fecha de hoy
If
DateTime.Compare(e.TimeSlot.Start.[
Date
], DateTime.Now.[
Date
]) = 0
Then
Select
Case
RadScheduler1.SelectedView
Case
SchedulerViewType.DayView
e.TimeSlot.CssClass =
"CurrentDay_WeekView"
Case
SchedulerViewType.WeekView
e.TimeSlot.CssClass =
"CurrentDay_WeekView"
Case
SchedulerViewType.MonthView
e.TimeSlot.CssClass =
"CurrentDay_MonthView"
End
Select
End
If
End
Sub
Everything Works fine. In month view, when there are no holidays in the displayed month, the height of the days boxes is 3 lines (3 divs), as defined with:
<
MonthView
UserSelectable
=
"true"
MinimumRowHeight
=
"3"
/>
However, if there is any holiday present in the displayed month, the height of all the displayed days boxes changes to 4.
I would like to keep the height of all the days boxes (regardless there are holidays or not present) in 3 lines. Is there any way to achieve this?
Thank you,
Joaquín