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

RADScheduleView: Index was out of range

2 Answers 106 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Gianluca Ciocci
Top achievements
Rank 1
Gianluca Ciocci asked on 30 Mar 2011, 11:09 AM
Hi,
I have this error when I set the Appointmet collection:
"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"

the Stack trace is:

   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Telerik.Windows.Controls.AppointmentsHelper.SplitToColumns(AppointmentSlotGroupInfo groupInfo, TimeSpan startTime, TimeSpan endTime, Func`2 roundAppointmentDurationToDay)
   at Telerik.Windows.Controls.ScheduleViewBase.CalculateAppointmentItemRenderRectangle()
   at Telerik.Windows.Controls.ScheduleViewBase.Initialize()
   at Telerik.Windows.Controls.ScheduleViewBase.RegenerateGroupHeaders()
   at Telerik.Windows.Controls.ScheduleViewBase.OnAppointmentSourceChanged(IEnumerable oldValue, IEnumerable newValue)
   at Telerik.Windows.Controls.ScheduleViewBase.OnAppointmentsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.ScheduleViewBase.set_AppointmentsSource(IEnumerable value)
   at SLToDoScheduleView.ToDoScheduleView.FillGantt(GroupByCommessaModel context, Boolean reset)
   at SLToDoScheduleView.ToDoScheduleView._ctx_GetAllActivitiesByXmlCompleted(Object sender, GetAllActivitiesByXmlCompletedEventArgs e)
   at SLToDoScheduleView.ActivityService.ActivityServiceClient.OnGetAllActivitiesByXmlCompleted(Object state)

Could you help me?

Thanks a lot
Gianluca

2 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 30 Mar 2011, 12:57 PM
Hello Gianluca,

Most probably in the appointments collection there is an appointment with specific properties that trigger a bug in RadScheduleView. Is it possible for you to send me a simple application that could be used to debug the problem? Just open a support ticket and attach the project there.

Kind regards,
Valeri Hristov
the Telerik team
0
Gianluca Ciocci
Top achievements
Rank 1
answered on 30 Mar 2011, 02:23 PM
Hello Valeri,

I found the cause of my problem...
In my xml datasource there are many items with the Start Date > End Date (it is an error!) and this condition throw an exeption on Appointment RADScheduleView DataSource.

That's all.

King Regards,
Gianluca
Solidzone team

Tags
ScheduleView
Asked by
Gianluca Ciocci
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Gianluca Ciocci
Top achievements
Rank 1
Share this question
or