15.4.0.17 throws exception on RefreshListViewItems

I have just updated sflistview to latest version it crashes with the exception below if I have SfNumericUpDown within the datatemplate, and when I have focus inside the SfNumericUpDown, it will throw exception. this code was working with previous versions.

11-13 23:10:08.420 I/MonoDroid(13612): System.NullReferenceException: Object reference not set to an instance of an object.
11-13 23:10:08.421 I/MonoDroid(13612):   at Syncfusion.ListView.XForms.GridLayout.RefreshListViewItems (System.Int32 itemIndex) [0x0007c] in <3283a7f952214cec8b6265404bdec5ae>:0 
11-13 23:10:08.421 I/MonoDroid(13612):   at Syncfusion.ListView.XForms.Android.ExtendedScrollViewRenderer.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00131] in <d5f7173dd9584722a70f5e9850b09c28>:0 
11-13 23:10:08.421 I/MonoDroid(13612):   at Android.Views.View.n_OnMeasure_II (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00008] in <c82a099136944d8aa96281cf061cbc12>:0 
11-13 23:10:08.421 I/MonoDroid(13612):   at (wrapper dynamic-method) System.Object:93bac632-06fa-463a-8a8c-bf0e3f3caace (intptr,intptr,int,int)

      <sfListView:SfListView x:Name="listSets"  ItemsSource="{Binding Path=BindingContext.Logs, Source={x:Reference Name=cwSetlogs}}" 
                               SelectionMode="None" AllowGroupExpandCollapse="True"
          Orientation="Vertical"   IsStickyHeader="True"    ItemSpacing="1" AllowSwiping="False" 
                               AutoFitMode="Height"  HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" 
                               GroupHeaderTemplate="{StaticResource GroupHeaderTemplate}">
            <sfListView:SfListView.LayoutManager>
                <sfListView:LinearLayout   />
            </sfListView:SfListView.LayoutManager>            
            <sfListView:SfListView.HeaderTemplate>
                <DataTemplate>
                    <Grid x:Name="grdTitle"  HeightRequest="20">
                        </Grid>
                </DataTemplate>
            </sfListView:SfListView.HeaderTemplate>
            <sfListView:SfListView.DataSource>
                <data:DataSource>
                    <data:DataSource.GroupDescriptors>
                        <data:GroupDescriptor PropertyName="Name" />
                    </data:DataSource.GroupDescriptors>
                </data:DataSource>
            </sfListView:SfListView.DataSource>   
            <sfListView:SfListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell>
                        <ViewCell.View>
                            <Frame Padding="1"  HasShadow="True" OutlineColor="Gray"  HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                                <numeric:SfNumericUpDown    Style="{StaticResource NumericStyle}"  SpinButtonAlignment="Both"   
                                     FormatString="{Binding Path=BindingContext.Format, Source={x:Reference Name=cwlogs}}"
                                      ValueChangeMode="OnKeyFocus"  TextAlignment="Center"     Value="{Binding Weight, Mode=TwoWay}"   >
                                    >
                                </numeric:SfNumericUpDown>
                            </Frame>

                        </ViewCell.View>
                    </ViewCell>
                </DataTemplate>
            </sfListView:SfListView.ItemTemplate>
        </sfListView:SfListView>


5 Replies

MK Muthu Kumaran Gnanavinayagam Syncfusion Team November 15, 2017 07:33 AM UTC

Hi Emil,  
  
We have checked with the attached stack trace and template provided from our side. Can you please follow up the incident created under your account for further update on this.  
  
Regards,  
G.Muthu Kumaran.  



RT Roman Tkachev November 17, 2017 12:16 PM UTC

I've got the same problem on UWP:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.ListView.XForms.GridLayout.RefreshListViewItems(Int32 itemIndex)
   at Syncfusion.ListView.XForms.UWP.ExtendedScrollViewRenderer.ScrollView_LayoutUpdated(Object sender, Object e)


EM Emil November 17, 2017 03:25 PM UTC

Hi Roman,

Do you have a sample app that you can provide to Syncfusion team. I tried to create a test app using same code but unfortunately it doesnt occur on a fresh app. But on my original app, it is crashing. I cant unfortunately rebuilt everything from the beginning as my app is too large. I appreciate if you can provide a sample app.

thanks,

Emil


RT Roman Tkachev November 20, 2017 07:36 AM UTC

problem with set LayoutManager in xaml

<sflv:SfListView.LayoutManager>
  <sflv:GridLayout SpanCount="2" />
sflv:SfListView.LayoutManager>
  

or 

<sflv:SfListView.LayoutManager>
  <sflv:
LinearLayout />
sflv:SfListView.LayoutManager>
  

without it - all ok

                    List items = CreateMenu();
                    menuListView.ItemsSource = items;
                    if (items.Count > 0 && !(menuListView.LayoutManager is GridLayout)) {
                        menuListView.LayoutManager = new GridLayout
                        {
                            SpanCount = 2
                        };
                    }


MK Muthu Kumaran Gnanavinayagam Syncfusion Team November 20, 2017 12:09 PM UTC

Hi Roman, 
 
A support incident has been created under your account to track the status of the reported query. Please log on to our support website to check for further updates.      
   
 
Regards, 
G.Muthu Kumaran. 


Loader.
Up arrow icon