Changed SfListView from LoadMoreOption.None to LoadMoreOption.AutoOnScroll throw Object reference not set to an instance of an object.

Hi Syncfusion,

I have problem when using SfListView

First loaded, my SfListView is empty datasource. After that, I using pull to refresh to refresh datasource, then I set SfListView.LoadMoreOption to AutoOnScroll first. => It crash.

Here is stacktrace:

at Syncfusion.ListView.XForms.LinearLayout.UpdateRowCount () [0x00006] in :0

at Syncfusion.ListView.XForms.SfListView.OnLoadMoreOptionChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x000a7] in :0

at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00120] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:512

at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:446

at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0004d] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:374

at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:349

at Syncfusion.ListView.XForms.SfListView.set_LoadMoreOption (Syncfusion.ListView.XForms.LoadMoreOption value) [0x00000] in :0


Please check and fixit if this is an error. Thanks


1 Reply

LN Lakshmi Natarajan Syncfusion Team December 20, 2021 03:21 PM UTC

Hi Nguyen, 
 
We could not replicate the reported scenario in our sample. You can find the tested sample and video in the following link, 
 
 
Please check our sample and let us know if you still facing the same issue or not? If not, please modify our sample and revert us back with the following details which would be helpful for us to check on it and provide you the solution as soon as possible. 
  • Share ListView related code snippets
  • Share Refreshing and LoadMore related code snippets
  • Share tested device details
  • Share issue replication video
  • Share Syncfusion and Xamarin.Forms version
 
Lakshmi Natarajan 
 


Loader.
Up arrow icon