Last Updated: 09 Oct 2014 10:28 by ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 25 Jul 2014 13:12
Category: Scheduler/Reminder
Type: Bug Report
FIX. RadScheduler - After changing the GroupType, StartDate/RangeStartDate are reset
To reproduce :
1. Add a RadScheduler and a RadToggleButton.
2. Use the following code snippet:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.RadScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Timeline

    Dim colors As Color() = New Color() {Color.LightBlue, Color.LightGreen, Color.LightYellow, Color.Red, Color.Orange, Color.Pink, _
        Color.Purple, Color.Peru, Color.PowderBlue}

    Dim names As String() = New String() {"Alan Smith", "Anne Dodsworth", "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"}

    For i As Integer = 0 To names.Length - 1
        Dim resource As New Resource()
        resource.Id = New EventId(i)
        resource.Name = names(i)
        resource.Color = colors(i)

    Me.RadScheduler1.ActiveView.ResourcesPerView = 2

    Dim timelineView As SchedulerTimelineView = Me.RadScheduler1.GetTimelineView()
    Dim scale As Timescales = Timescales.Hours
    timelineView.StartDate = DateTime.Now.Date.AddHours(5)
    timelineView.RangeStartDate = DateTime.Now.Date.AddHours(5)
    timelineView.RangeEndDate = DateTime.Now.Date.AddHours(15)
    timelineView.CurrentScale.DisplayedCellsCount = 10
End Sub

Private Sub RadToggleButton1_ToggleStateChanged(sender As Object, args As StateChangedEventArgs) Handles RadToggleButton1.ToggleStateChanged
    If args.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On Then
        Me.RadScheduler1.GroupType = GroupType.Resource
        Me.RadScheduler1.GroupType = GroupType.None
    End If
End Sub

Initially, the timeline view start from the correct hour (5 AM). However, the horizontal scroll bar allows you to navigate in right direction as the  RangeEndDate is currently visible in the view. When you click the toggle button, the scheduler is grouped by resources and the timeline start is reset.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)