This is a migrated thread and some comments may be shown as answers.

How to get the height of the actual schedule or the group header?

2 Answers 136 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Kristian
Top achievements
Rank 1
Kristian asked on 16 Aug 2011, 08:52 AM
Hi,

In the past, I've managed to successfully create a sort of time marker that show the current time. This marker worked fine until I upgraded to the newest version of RadControls in order to utilize the new AllDay Event-functionality.

Screenshot

Because of the new AllDay-area in the top of the calendar, my time marker shows the incorrect time. The algorithm used to calculate the position of the marker needs to know the height of the actual schedule (the scrollable area, marked with a long red line in the screenshot) in order to work. Earlier, I resorted to using the schedule's ActualHeight-property - a hardcoded static value (that corresponded to the group header height). However, this won't work now, as every AllDay Event changes the height of the group header area.

This leads me to the question; Is there a way of getting the height of the group header-part of the schedule (marked with a short red line on the screenshot) or the actual schedule (marked with a long red line on the screenshot)?

Thanks,
Kristian

2 Answers, 1 is accepted

Sort by
0
Accepted
Pana
Telerik team
answered on 19 Aug 2011, 11:51 AM
Hi Kristian,

HeadersLength is the property on RadScheduleView that offsets the timeruler from the top so you could use it. Also you could add a Slot in the SpecialSlotsSource of the RadScheduleView that starts and ends now and provide a good visual Q for it. The SpecialSlot however would appear behind the mouse over visual which could be a somehow problematic. Please find the attached solution with both features displayed. I believe the HeadersLenght property would be enough for you. Also note that we have plans to implement the today marker in RadScheduleView in future.

All the best,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Kristian
Top achievements
Rank 1
answered on 19 Aug 2011, 01:58 PM
Hi Pana,

Thanks! The HeadersLength property was exactly what I was looking for (I'm now using Schedule.ActualHeight - Schedule.HeadersLength to calculate the height of the actual schedule).

Regards,
Kristian
Tags
ScheduleView
Asked by
Kristian
Top achievements
Rank 1
Answers by
Pana
Telerik team
Kristian
Top achievements
Rank 1
Share this question
or