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

System.ArgumentOutOfRangeException: Insertion index was out of range

3 Answers 98 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Serey
Top achievements
Rank 1
Serey asked on 16 Apr 2018, 04:11 PM

We're using RadScheduler for scheduling, which allows users to move around scheduled services. However, occasionally, we receive this error. 

 

System.ArgumentOutOfRangeException: Insertion index was out of range. Must be non-negative and less than or equal to size.  Parameter name: index     

       at System.Web.UI.StateManagedCollection.System.Collections.IList.set_Item(Int32 index, Object value)     
       at Telerik.Web.StronglyTypedStateManagedCollection`1.set_Item(Int32 index, ItemType value)     
       at Telerik.Web.UI.RadScheduler.Telerik.Web.UI.IScheduler.HandleMove(Appointment appointmentToMove, DateTime start, DateTime end, Boolean editSeries, ResourceUpdateInfo resourceUpdateInfo)     
       at Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Model.HandleMove(Appointment appointment, ISchedulerTimeSlot sourceSlot, ISchedulerTimeSlot targetSlot, Boolean editSeries)     

       at Telerik.Web.UI.Scheduler.Views.SchedulerModel.ProcessPostBackCommand(SchedulerPostBackEvent postBack)     

       at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack)     

       at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument)     

       at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)     

       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     

       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)     

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

It's been going on for years, and we don't have a clue how it happens. We have not been able to replicate it. I'm wondering if somebody could give us a clue how it might happen from the error message. 

Thank you. 

 

3 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 19 Apr 2018, 04:31 PM
Hello Serey,

We had a similar report a long time ago and the problem was that the GroupBy property was configured on a View level (e.g. TimelineView-GroupBy="User") and the workaround for the issue was to set the GroupBy property on a Control level (e.g. <telerik:RadScheduler GroupBy="User" ... >).

If that does not help to resolve the issue, please share the Scheduler configuration and the steps for reproduction. If possible, you can send us a sample runnable sample attached to an official support ticket. That would allow us to investigate locally your exact scenario and help you more efficiently.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Serey
Top achievements
Rank 1
answered on 20 Apr 2018, 06:32 PM
Thank you for the response. I will try that. 
0
Matt
Top achievements
Rank 1
Iron
answered on 27 Apr 2022, 04:10 AM
If it helps someone else:  I encountered this same error on a RadScheduler bound to a DataTable.  In my case the data source did not have unique values for the DataKeyField.  Once I fixed that, the issue was resolved.
Tags
Scheduler
Asked by
Serey
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Serey
Top achievements
Rank 1
Matt
Top achievements
Rank 1
Iron
Share this question
or