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.
Unfortunately, activation email could not send to your email. Please try again.

ScrollToRowIndex doesnt work in 15.3.0.33

Thread ID:

Created:

Updated:

Platform:

Replies:

132956 Sep 30,2017 07:05 AM Oct 11,2017 07:32 AM Xamarin.Forms 5
loading
Tags: SfListView
Emil
Asked On September 30, 2017 07:05 AM

ScrolltoRowIndex throws exception in latest version with the exception message below. 
this code below works just fine on version  15.3.0.29

 (listExercises.LayoutManager as Syncfusion.ListView.XForms.LinearLayout).ScrollToRowIndex(3);
                

{System.NullReferenceException: Object reference not set to an instance of an object.
  at Syncfusion.ListView.XForms.Android.ExtendedScrollViewRenderer.ExtendedScrollViewRenderer_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0003a] in <d6e57e21c8614f3e8b46ec1182767a41>:0 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:136 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:380 
  at Syncfusion.ListView.XForms.ExtendedScrollView.set_ScrollPosition (System.Int32 value) [0x00011] in <a1a189e012b743fa8a431aa7607ea1d9>:0 
  at Syncfusion.ListView.XForms.LayoutBase.ScrollToRowIndex (System.Int32 rowIndex, System.Boolean disableAnimation) [0x000d7] in <a1a189e012b743fa8a431aa7607ea1d9>:0 
  

Dinesh Babu Yadav [Syncfusion]
Replied On October 2, 2017 06:09 AM

Hi Emil, 
 
Thank you for contacting Syncfusion support. 
 
We have checked the reported issue “Exception throws when ScrollToRowIndex is used” with the latest SfListView version(v 15.3.0.33) at our sample. In the sample, we have scrolled to desired index in a button event at runtime using ScrollToRowIndex method but we did not face any issue as reported. We suspect that the issue occur might due to SfListView assemblies may not added or referenced properly in Android renderer project.  
 
So, we recommend you to please ensure that assemblies are referred in both PCL and Android renderer project and for more information please refer the following UG documentation link. 
 
 
For your reference, we have attached the ensured sample with latest SfListView version at our end and you can download it from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 


Emil
Replied On October 2, 2017 07:22 AM

I have just modified your sample and I could reproduce the problem. Changes I have done,

- Updated Android Support Libraries to latest

-I added selecteditem and moved scrolltorowindex into Property_changed event. Because in my scenario, I want to scroll to the selecteditem's index. Selecteditem is set in viewmodel and propertychanged should scroll to its index. In the sample attached you can change the selecteditem by selecting any item and you will see that it doesnt either scroll at all or it scrolls to wrong index than defined. Please try several times.

-If you downgrade to previous version with 15.3.0.29, you will see that it works fine.


Attachment: AutoFitSample_4ace19a1.7z

Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On October 3, 2017 08:29 AM

Hi Emil,   
   
Sorry for the inconvenience caused.    
    
We are able to reproduce the reported issue “ScrollToRowIndex doesn’t work when defining same item index” at our end even after downgrading the SfListView version to 15.3.0.29. As this is forum, we cannot provide patch so, a support incident has been created under your account for providing custom assemblies which includes the fix for the reported issue. Please log on to our support website to check for further updates.             
       
    
Regards,    
G.Muthu Kumaran. 


Christoph Nienaber
Replied On October 10, 2017 05:52 PM

I have the same issue. Please provide the fix.


Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On October 11, 2017 07:32 AM

Hi Christoph,   
   
We have already checked the reported query “NullReferenceException throws when ScrollToRowIndex method is used” from our side. We found that the reported issue does not reproduce at our end and we have also attached the working sample link in previous update, but we have faced another issue which is “ScrollToRowIndex doesn’t work when passing same item index again after scrolling”, so we have fixed that issue.  And that fix will be included in our upcoming 2017 Volume 4 main release. So please provide us below details regarding your issue:  
   
  • Does the NullReferenceException throws when ScrollToRowIndex method is used in your sample? If yes, please share exception stack trace along with the replication procedure or video link which helps us to analyze the issue better.
  • Does the SfListView’s Orientation is set as ‘Horizontal’?
   
Please let us know if you require further assistance.   
   
Regards,   
G. Muthu Kumaran.   


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.

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.

;