In my scheduler i leave the rowheight set to default, thinking this will work best with a varity of browsers (both desktop and mobile).
However i have created a 'current time indicator line' by adding an image to the timeslot.
As MinutesPerRow is set to 30, i do :
-----------
protected void Scheduler_OnTimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
{
if (Scheduler.SelectedView == SchedulerViewType.WeekView || Scheduler.SelectedView == SchedulerViewType.DayView)
{
if (e.TimeSlot.Start.Date == DateTime.Now.Date)
{
e.TimeSlot.CssClass = "today";
}
if ((e.TimeSlot.End < DateTime.Now.AddMinutes(30)) && (e.TimeSlot.End > DateTime.Now))
{
int currentMinute = (DateTime.Now.Minute >= 30) ? DateTime.Now.Minute - 30 : DateTime.Now.Minute;
e.TimeSlot.CssClass = "now" + currentMinute;
}
}
}
-----------
In the aspx page i have cssclasses like :
-----------
html .RadScheduler .now0 {
background: #FFFBE6;
background-image: url('/images/Scheduler/1.png');
background-repeat: repeat-x;
}
html .RadScheduler .now1 {
background: #FFFBE6;
background-image: url('/images/Scheduler/2.png');
background-repeat: repeat-x;
}
html .RadScheduler .now2 {
background: #FFFBE6;
background-image: url('/images/Scheduler/3.png');
background-repeat: repeat-x;
}
-----------
See attached file for 1 one of the images, in this case 14.png
It looks like this works fine, except for the fact that the row height is set to 25px and my images are 30px high.
So from minute 26-29 and 56-59 the correct image is shown, but my red-dotted-line on the image is shown OUTSIDE the timeslot (thus NOT shown).
What i would like to do now is GET the rowheight used by the scheduler and use that to calculate which image should be shown.
So : is there a way to GET the rowheight being used by the scheduler ?
However i have created a 'current time indicator line' by adding an image to the timeslot.
As MinutesPerRow is set to 30, i do :
-----------
protected void Scheduler_OnTimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
{
if (Scheduler.SelectedView == SchedulerViewType.WeekView || Scheduler.SelectedView == SchedulerViewType.DayView)
{
if (e.TimeSlot.Start.Date == DateTime.Now.Date)
{
e.TimeSlot.CssClass = "today";
}
if ((e.TimeSlot.End < DateTime.Now.AddMinutes(30)) && (e.TimeSlot.End > DateTime.Now))
{
int currentMinute = (DateTime.Now.Minute >= 30) ? DateTime.Now.Minute - 30 : DateTime.Now.Minute;
e.TimeSlot.CssClass = "now" + currentMinute;
}
}
}
-----------
In the aspx page i have cssclasses like :
-----------
html .RadScheduler .now0 {
background: #FFFBE6;
background-image: url('/images/Scheduler/1.png');
background-repeat: repeat-x;
}
html .RadScheduler .now1 {
background: #FFFBE6;
background-image: url('/images/Scheduler/2.png');
background-repeat: repeat-x;
}
html .RadScheduler .now2 {
background: #FFFBE6;
background-image: url('/images/Scheduler/3.png');
background-repeat: repeat-x;
}
-----------
See attached file for 1 one of the images, in this case 14.png
It looks like this works fine, except for the fact that the row height is set to 25px and my images are 30px high.
So from minute 26-29 and 56-59 the correct image is shown, but my red-dotted-line on the image is shown OUTSIDE the timeslot (thus NOT shown).
What i would like to do now is GET the rowheight used by the scheduler and use that to calculate which image should be shown.
So : is there a way to GET the rowheight being used by the scheduler ?