Group Header - Collapse Expanse throws exception

Hi, 

When i tap several times,  in the GroupHeader of a SfListView. System will crash with exception:

  at Syncfusion.GridCommon.ScrollAxis.DistanceRangeCounterCollection.CheckRange (System.String paramName, System.Int32 from, System.Int32 to, System.Int32 actualValue) [0x00046] in <0a6d5895fd024033bc4f774d63be125c>:0 
  at Syncfusion.GridCommon.ScrollAxis.DistanceRangeCounterCollection.SetRange (System.Int32 from, System.Int32 to, System.Double distance) [0x0000d] in <0a6d5895fd024033bc4f774d63be125c>:0 
  at Syncfusion.GridCommon.ScrollAxis.LineSizeCollection.InitializeDistances () [0x00101] in <0a6d5895fd024033bc4f774d63be125c>:0 
  at Syncfusion.GridCommon.ScrollAxis.LineSizeCollection.ResumeUpdates () [0x0001e] in <0a6d5895fd024033bc4f774d63be125c>:0 
  at Syncfusion.ListView.XForms.LinearLayout.OnItemsCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000a5] in <8d19a826008945e69e06f69bf4552e09>:0 
  at Syncfusion.ListView.XForms.SfListView.DisplayItems_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00029] in <8d19a826008945e69e06f69bf4552e09>:0 
  at Syncfusion.DataSource.DisplayItems.RaiseCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x00008] in <0263281c73454d5b8db10ceef45b892f>:0 
  at Syncfusion.DataSource.Extensions.GroupResult.Collapse () [0x0006a] in <0263281c73454d5b8db10ceef45b892f>:0 
  at Syncfusion.ListView.XForms.SfListView.CollapseGroup (Syncfusion.DataSource.Extensions.GroupResult group) [0x00048] in <8d19a826008945e69e06f69bf4552e09>:0 
  at Syncfusion.ListView.XForms.ItemGenerator.ProcessGroupHeaderItem (Syncfusion.ListView.XForms.ListViewItemInfoBase item) [0x00018] in <8d19a826008945e69e06f69bf4552e09>:0 
  at Syncfusion.ListView.XForms.ListViewItemInfoBase.HandleTouchInteraction (Syncfusion.ListView.XForms.TouchGesture gesture, Xamarin.Forms.Point position) [0x0004c] in <8d19a826008945e69e06f69bf4552e09>:0 
  at Syncfusion.ListView.XForms.iOS.ListViewItemRenderer.OnTapped () [0x0003a] in <8bbb26b49ad44b8b8056a810bd5eb3f8>:0 
  at Syncfusion.ListView.XForms.iOS.ListViewItemRenderer.<OnElementChanged>b__20_1 () [0x0000c] in <8bbb26b49ad44b8b8056a810bd5eb3f8>:0 
  at UIKit.UIGestureRecognizer+ParameterlessDispatch.Activated () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/UIKit/UIGestureRecognizer.cs:93 
--- End of stack trace from previous location where exception was thrown ---

  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at Handover.iOS.Application.Main (System.String[] args) [0x00001] in /Users/tung/Projects/Handover/Handover.iOS/Main.cs:17 


My code is simple as below:

<xforms:SfListView x:Name="CheckItems" RowSpacing="3" ItemSpacing="5" AutoFitMode="DynamicHeight"  AllowGroupExpandCollapse="True" IsStickyGroupHeader="True" >
                   <xforms:SfListView.DataSource>
                       <data:DataSource>
                           <data:DataSource.GroupDescriptors>
                               <data:GroupDescriptor PropertyName="CheckGroup"></data:GroupDescriptor>
                           </data:DataSource.GroupDescriptors>
                       </data:DataSource>
                   </xforms:SfListView.DataSource>
                   <xforms:SfListView.GroupHeaderTemplate>

                       <DataTemplate>
                           <Grid BackgroundColor="Transparent" HeightRequest="50">
                               <Grid.ColumnDefinitions>
                                   <ColumnDefinition Width="30"/>
                                   <ColumnDefinition Width="2*"/>
                                   <ColumnDefinition Width="*"/>
                               </Grid.ColumnDefinitions>

                               <Image IsVisible="{Binding IsExpand}" Source="{Binding Converter={StaticResource Image}, ConverterParameter='F:DownDir|#00AFBC'}" HorizontalOptions="Center" VerticalOptions="Center" Aspect="AspectFit"></Image>

                               <Label Grid.Column="1" Text="{Binding Key}" TextColor="#00AFBC" FontSize="Subtitle" VerticalOptions="Center" />

                               <StackLayout Grid.Column="2" Orientation="Horizontal" HorizontalOptions="EndAndExpand" VerticalOptions="Center">
                                   <Label Text="{Binding Count}" TextColor="#00AFBC" FontSize="Small"/>
                                   <Label Text="Item(s)" TextColor="#00AFBC" FontSize="Small" />
                               </StackLayout>
                           </Grid>
                       </DataTemplate>

                   </xforms:SfListView.GroupHeaderTemplate>
                   <xforms:SfListView.ItemTemplate>
                       <DataTemplate>
                           <ViewCell>
                              <Label Text="List Items">

                           </ViewCell>
                       </DataTemplate>
                   </xforms:SfListView.ItemTemplate>
               </xforms:SfListView>


1 Reply

SS SaiGanesh Sakthivel Syncfusion Team May 18, 2020 12:22 PM UTC

Hi Tung,  
 
Thank you for contacting Syncfusion support.  
 
We have checked the reported query “Group Header – Collapse Expanse throws exception” from our end. We regret to inform that we couldn’t able to replicate the reported issue from our end. We have attached the tested sample in the following Link  
  
  
Please check the sample and if you are still facing the issue kindly modify our sample to replicate the issue with following details,  
  
·       Please share the xaml and viewmodel page. 
·       Version of Syncfusion schedule and Xamarin form. 
·       Issue reproduce video or screenshot. 
   
Regards,  
SaiGanesh Sakthivel 


Loader.
Up arrow icon