Completed
Last Updated: 01 Jul 2014 10:01 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 26 Jun 2014 12:31
Category: Scheduler/Reminder
Type: Bug Report
0
FIX. RadScheduler - NullReferenceException when the scheduler is grouped by resource and localization provider is applied
To reproduce:
 Sub New()
     InitializeComponent()

     Dim colors() As Color = {Color.LightBlue, Color.LightGreen, Color.LightYellow, Color.Red, Color.Orange}

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

     For i As Integer = 0 To names.Length - 1
         Dim resource As New Telerik.WinControls.UI.Resource()
         resource.Id = New EventId(i)
         resource.Name = names(i)
         resource.Color = colors(i)
         Me.RadScheduler1.Resources.Add(resource)
     Next i
     Me.RadScheduler1.GroupType = GroupType.Resource
     Me.RadScheduler1.ActiveView.ResourcesPerView = 2

     Dim rand As New Random

     For index = 1 To 20
         Dim appointment As New Appointment(Date.Now.AddHours(index), TimeSpan.FromMinutes(30), "Summary", "Description")
         appointment.StatusId = RadScheduler1.Statuses(rand.Next(0, RadScheduler1.Statuses.Count)).Id
         appointment.BackgroundId = RadScheduler1.Backgrounds(rand.Next(0, RadScheduler1.Backgrounds.Count)).Id
         appointment.ResourceId = RadScheduler1.Resources(rand.Next(0, RadScheduler1.Resources.Count)).Id
         Me.RadScheduler1.Appointments.Add(appointment)
     Next
     RadSchedulerLocalizationProvider.CurrentProvider = New CustomSchedulerLocalizationProviderInglese()
 End Sub

 Public Class CustomSchedulerLocalizationProviderInglese
     Inherits RadSchedulerLocalizationProvider
     Public Overrides Function GetLocalizedString(id As String) As String
         
         Return MyBase.GetLocalizedString(id)

     End Function
 End Class
0 comments