We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SFSchedule crashes when the collection appointment collection is empty for today

Thread ID:

Created:

Updated:

Platform:

Replies:

148492 Oct 22,2019 01:42 PM UTC Oct 23,2019 09:22 AM UTC Xamarin.Forms 2
loading
Tags: SfSchedule
Michael
Asked On October 22, 2019 01:42 PM UTC

It seems like a new problem or I haven't encountered it yet. 
When switching to the view I'm greeted with an exception...

**System.ArgumentOutOfRangeException:** 'Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index'

10-22 15:11:26.840 I/MonoDroid( 6716): UNHANDLED EXCEPTION:
10-22 15:11:26.840 I/MonoDroid( 6716): System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
10-22 15:11:26.840 I/MonoDroid( 6716): Parameter name: index
10-22 15:11:26.840 I/MonoDroid( 6716):   at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <9356a4b185c848f09ae2606849b9c534>:0 
10-22 15:11:26.840 I/MonoDroid( 6716):   at System.Collections.ObjectModel.Collection`1[T].get_Item (System.Int32 index) [0x00000] in <9356a4b185c848f09ae2606849b9c534>:0 
10-22 15:11:26.840 I/MonoDroid( 6716):   at Com.Syncfusion.Schedule.SfSchedule.UpdateSelection (System.Boolean canOpenInline) [0x001b2] in <e49d37741c4b4047a92a0ddbad4877e5>:0 
10-22 15:11:26.840 I/MonoDroid( 6716):   at Com.Syncfusion.Schedule.SfSchedule.OnQueryAppointmentChangedEventArgs (Com.Syncfusion.Schedule.QueryAppointmentEventArgs args) [0x00028] in <e49d37741c4b4047a92a0ddbad4877e5>:0 
10-22 15:11:26.840 I/MonoDroid( 6716):   at Com.Syncfusion.Schedule.SfSchedule.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x001aa] in <e49d37741c4b4047a92a0ddbad4877e5>:0 
10-22 15:11:26.841 I/MonoDroid( 6716):   at Android.Views.View.n_OnMeasure_II (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00009] in /Users/vsts/agent/2.155.1/work/1/s/src/Mono.Android/obj/Release/android-28/mcw/Android.Views.View.cs:16644 
10-22 15:11:26.841 I/MonoDroid( 6716):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.34(intptr,intptr,int,int)



Michael
Replied On October 22, 2019 01:54 PM UTC


here is my xaml and I'm starting the view in weekView Mode. MonthviewMode works

                            ScheduleView="{Binding ViewMode}" DataSource="{Binding Items}"
                            SelectedDate="{Binding SelectedDate, Mode=TwoWay}"
                            FirstDayOfWeek="2" VisibleDatesChangedCommand="{ Binding ScheduleVisibleDatesChanged }"
                            CellTapped="Schedule_CellAppointmentTapped" 
                            ShowAppointmentsInline="false" MonthInlineAppointmentTapped="Schedule_MonthInlineAppointmentTapped" 
                          
                          
                            Grid.Row="1"
                            ViewHeaderHeight="40" HeaderHeight="40"  >


               
                   
                        FontFamily="Arial"
                        FontSize="12"  />
               

               
                   
                        DayFontFamily="Arial"
                        DayFontSize="10"
                        DateFontFamily="Arial"
                        DateFontSize="10" />
               

               
                   
                                        WorkStartHour="{Binding CourseStartHour}"
                                        WorkEndHour="{Binding CourseEndHour}">
                       
                           
                       
                   
               

               
                   
                   
                                            ShowAgendaView="true" 
                                            />
               


               
               
                   
                        EndTimeMapping="To"
                        StartTimeMapping="From"
                        SubjectMapping="Title"
                        ColorMapping="Color" 
                        IsAllDayMapping="IsBirthday"/>
               
           

Indumathi Ravichandran [Syncfusion]
Replied On October 23, 2019 09:22 AM UTC

Hi Michael,    
   
Thank you for contacting Syncfusion support.   
   
We have checked the reported issue “System.ArgumentOutOfRangeException occurred while changing the ScheduleView in Schedule” and we are unable to reproduce the issue from our end. We checked by changing the ScheduleView dynamically and checked with CellTapped and MonthInlineAppointmentTapped events, it is working fine as expected. We have attached the tested sample and video for your reference.   
 
Please find the sample and video from below link.  
   
Tested Versions:   
·       Syncfusion update version 17.3.0.19   
·       Xamarin.Forms version 3.6.0.344457   
   
   
   
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back with the below details.  
   
·       Device configuration details   
·       Issue reproducing video (if possible)   
·       Syncfusion and Xamarin.Forms update version   
 
It will be helpful for us to check on it and provide you the solution at the earliest.   
 
Regards, 
Indumathi R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon