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.

SfListView crashes my app when navigate back to main page.

Thread ID:

Created:

Updated:

Platform:

Replies:

130011 Apr 14,2017 07:52 AM Apr 25,2017 11:42 PM Xamarin.Forms 5
loading
Tags: SfListView
Devi Prasad
Asked On April 14, 2017 07:52 AM

I am working with xamarin forms and i used sflistview, this is working fine on android and ios when coming to windows my app is crashes when navigate to sflistview main page,

i cant handle the crash report, and i don't no what is going on and the final exception showing Object reference not set to an instance of an object.

Dinesh Babu Yadav [Syncfusion]
Replied On April 17, 2017 12:19 AM

Hi Prasad, 
 
Thank you for contacting the Syncfusion Support. 
 
We have analyzed the reported issue “Null Reference exception throws while navigating to SfListView main page” with our sample. In the sample, we have navigate the SfListView page in an button click event by using PushAsync method as like below code snippet and PushModalAsync method and also navigate back to the MainPage but we didn’t face any issue as reported in the incident. We have also attached the sample for your reference and you can download it from the below link. 
 
 
Code Snippet[C#]: 
 
Navigation.PushAsync(new MainPage(), true); 
 
 
Could you please check with the above sample?. If the issue still reproduces at your end, please modify the above sample to reproduce the issue and update us with replication procedure and also, could you please share the below details which would help us to analyze the issue better and update you with appropriate solution.  
 
  • Could you please share in which layout the SfListView is loaded?
  • Can you please share the SfListView version and Xamarin Forms version?. We have tested in Xamarin Forms (v 2.3.3.180) and SfListView (v 15.1.0.41).
  • Have you used any specific scenario which replicate the issue? If possible, please replicate the issue in a sample.
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 


Devi Prasad
Replied On April 17, 2017 05:39 AM

But when we put this sflistview in tabbed page app is crashes. 

(My Crash Incident : I placed sf listview in tabbed page, and my page contains three tabs and each tab contains sf listview with items binding when i navigate to detail page from main tabbed page and back to main page the app is crashes..)  

Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On April 19, 2017 07:20 AM

Hi Prasad, 
 
We have analyzed the reported query “Null Reference exception throws while navigating in TabbedPage” and we are unable to reproduce the issue with our sample. In our sample, we have three tabs and load ListView in each tab. But, we didn’t face any issue while navigating across tabs and you can download the sample from the below link.  
 
 
Could you please check with the above sample? If the issue still reproduces at your end, please modify the above sample to reproduce the issue and update us with replication procedure and also, could you please share the below details which would help us to analyze the issue better and update you with appropriate solution.   
 
·       Could you please share in which layout the SfListView is loaded? 
·       Can you please share the SfListView version and Xamarin Forms version? We have tested in Xamarin Forms (v 2.3.3.180) and SfListView (v 15.1.0.41). 
Please let us know if you require further assistance. 
Regards, 
G.Muthu Kumaran. 


Devi Prasad
Replied On April 21, 2017 05:17 AM

I tried this one can you please download it check it in windows for multiple conditions..

here is my project url i shared it through dropbox.


Thank you,

Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On April 25, 2017 11:42 PM

Hi Prasad, 
 
We have analyzed the reported query “Null Reference exception throws while navigating in TabbedPage” and we would like to let you know that, the exception raised due to set the same GridLayout instance to LayoutManager of SfListView while navigation from one page to another page. So, you can achieve your requirement by creating separate instances for GridLayout for each ListView like below code snippets, 
 
Code example[C#]: 
protected override void OnSizeAllocated(double width, double height) 
{ 
    base.OnSizeAllocated(width, height); 
    if (width > 0 && pagewith != width) 
    { 
      double size = 0; 
      if (Device.OS == TargetPlatform.iOS && Device.Idiom == TargetIdiom.Tablet) 
      { 
        size = Application.Current.MainPage.Width / 300; 
      } 
      else 
        size = Application.Current.MainPage.Width / 250; 
      var sdf = size.ToString().Split('.')[0]; 
      size = Convert.ToInt32(sdf); 
         
      GridLayout gl = new GridLayout(); 
      GridLayout g2 = new GridLayout(); 
      GridLayout g3 = new GridLayout(); 
 
      gl.SpanCount = (int)size; 
      list1.LayoutManager = gl; 
      g2.SpanCount = (int)size; 
      list2.LayoutManager = g2; 
      g3.SpanCount = (int)size; 
      list3.LayoutManager = g3; 
    } 
} 
  
For your reference, we have attached the working sample below, 
 
 
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.

;