With the GroupType set to Resource and the ActiveViewType set to Day I want the All Day Header Height to be set to 15. Everytime I set the height with the GroupType set to Resource it gets reset to the height of 25. As long as the GroupType is set to None the All Day Header Height gets set to the desired size. Here is the code I am currently using to set the height.
'Add any resources that aren't already in the collection
For
Each
nCrew
In
SelectedCrews
If
IsNothing(nScheduler.Resources.GetById(nCrew.ID)) =
True
Then
nResource =
New
Telerik.WinControls.UI.Resource(
New
EventId(nCrew.ID), nCrew.Name)
nResource.Color = Color.Transparent
nScheduler.Resources.Add(nResource)
nScheduler.Resources.Item(nScheduler.Resources.Count - 1).SetDataItem(nCrew)
End
If
Next
nCrew
Dim
nDayView
As
SchedulerDayView = nScheduler.GetDayView
If
nDayView IsNot
Nothing
Then
nDayView.DayCount = 1
nDayView.ShowAllDayArea =
True
nDayView.ShowHeader =
False
'How many resource columns are displayed (cap at 7)
If
nScheduler.Resources IsNot
Nothing
Then
If
nScheduler.Resources.Count < 7
Then
nDayView.ResourcesPerView = nScheduler.Resources.Count
Else
nDayView.ResourcesPerView = 7
End
If
Else
nDayView.ResourcesPerView = 7
End
If
End
If
nScheduler.GroupType = GroupType.Resource
Dim
dayViewElement
As
SchedulerDayViewGroupedByResourceElement
If
TypeOf
nScheduler.SchedulerElement.ViewElement
Is
Telerik.WinControls.UI.SchedulerDayViewGroupedByResourceElement
Then
dayViewElement = TryCast(nScheduler.SchedulerElement.ViewElement, Telerik.WinControls.UI.SchedulerDayViewGroupedByResourceElement)
If
dayViewElement IsNot
Nothing
Then
dayViewElement.ResourceHeaderHeight = 25
dayViewElement.ResourcesHeader.Visibility = ElementVisibility.Visible
dayViewElement.AllDayHeaderHeight = 15
End
If
End
If
nScheduler.ResumeUpdate()
'Set up the Time Range on the Calendar
SetRuler(
Me
, nScheduler)