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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can't get DataGrid to work (Android)

Thread ID:

Created:

Updated:

Platform:

Replies:

127832 Dec 12,2016 03:11 PM UTC Oct 29,2018 10:45 AM UTC Xamarin.Forms 13
loading
Tags: SfDataGrid
Oliver Melcher
Asked On December 12, 2016 03:11 PM UTC

Hi,
i'm evaluating SfDataGrid Control for use in our App, but can't get it to work.
I followed the steps described here: https://help.syncfusion.com/xamarin/sfdatagrid/getting-started?cs-save-lang=1&cs-lang=xaml
After Step "Binding data to SfDataGrid" i tried to start the app but all i got was a NullReferenceException. The attached archive contains my example code.

 
12-12 16:06:08.730 I/MonoDroid(30698): UNHANDLED EXCEPTION:
12-12 16:06:08.749 I/MonoDroid(30698): System.NullReferenceException: Object reference not set to an instance of an object.
12-12 16:06:08.749 I/MonoDroid(30698):   at Syncfusion.SfDataGrid.XForms.Droid.ExtendedScrollViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00061] in <e7777f5460ef467fae38d3543aa61e1f>:0
12-12 16:06:08.749 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000f4] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:193
12-12 16:06:08.749 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:129
12-12 16:06:08.749 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289
12-12 16:06:08.749 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:74
12-12 16:06:08.749 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:207
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:58
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:337
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:196
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:129
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:74
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:207
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:58
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:337
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:196
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:129
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.AppCompat.Platform.AddChild (Xamarin.Forms.Page page, System.Boolean layout) [0x00015] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:250
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x00089] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:239
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage (Xamarin.Forms.Page page) [0x0009b] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:374
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.SetMainPage () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:444
12-12 16:06:08.750 I/MonoDroid(30698):   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.LoadApplication (Xamarin.Forms.Application application) [0x00183] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:135
12-12 16:06:08.750 I/MonoDroid(30698):   at SyncfusionTest.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00027] in D:\Workspaces\ResearchLab\SyncfusionTest\SyncfusionTest\SyncfusionTest.Droid\MainActivity.cs:23
12-12 16:06:08.750 I/MonoDroid(30698):   at Android.Support.V4.App.FragmentActivity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in <27c17fe440cf491ba8255bcefade6e02>:0
12-12 16:06:08.750 I/MonoDroid(30698):   at (wrapper dynamic-method) System.Object:682b3bc8-19ce-4b06-b3d1-38a1b03ac331 (intptr,intptr,intptr)

Attachment: SyncfusionTest_2510b5b3.zip

Ashok N [Syncfusion]
Replied On December 13, 2016 01:16 PM UTC

Hi Oliver,  

Thanks for contacting Syncfusion support.  

We already fixed the reported issue and this fix will be available in the upcoming 2016 Vol 4 SP release which will be rolling out on End of December, 2016. We will update you once the release rolls out.  

Regards,  
Ashok  


Oliver Melcher
Replied On December 13, 2016 01:29 PM UTC

But is there a workaround for me? How can i get the Grid to work? I'm still not able to show a simple grid, no matter what i do...
Or do you want to tell me, that the grid is currently unusable!?

Divakar Subramaniam [Syncfusion]
Replied On December 14, 2016 10:45 AM UTC

Hi Emil, 
 
A support incident to track the status your query has been created under your account. Please log on to our support website to check for further updates
 
   
 
Regards, 
Divakar. 


Maheshkumar
Replied On January 14, 2017 06:01 AM UTC

Is this issue fixed. I upgraded my PCL project to  14.4.0.15 and now I am started to get same error. Do I need to update my Xamarin from also I am currently on 2.3.2.127.

Ashok N [Syncfusion]
Replied On January 16, 2017 10:03 AM UTC

Hi Maheshkumar,               
   
We already fixed this issue with 14.4.0.20. We have prepared the sample and attached the working copy of our sample, you can download the same from the below link for your reference. Could you please do revert us by modifying our sample to replicate the issue. Otherwise please share your sample, that would be more helpful for us to proceed further.   
   
   
Could you please confirm in your side you have installed only SfDataGrid.XForms assemblies in your Forms project? If we have installed Xamarin.Android dll’s also in XForms project, The application will be crashed due to internal class conversion because SfDataGrid.Android.dll and SfDataGrid.XForms.dll have ScrollViewer class. Please refer the below UG lick for using SfDataGrid in your application.   


Making changes according to below points should fix your problem 
·         We recommend you to install the exact version of Xamarin NuGet supported by Syncfusion in the PCL and the renderer projects of your sample.   
·         Also, ensure no other version of Xamarin NuGets were installed in any of your PCL and renderer projects. Clean and rebuild the project before running it. You can see the software requirements of Syncfusion controls from our read me information.
http://files2.syncfusion.com/Installs/v14.4.0.20/ReadMe/Xamarin_Forms.html  
  
 Regards,   
Ashok   


Tiziano Cristini
Replied On May 19, 2017 10:04 AM UTC

Hello,
I've strange issue on android only platform.
I've sfDataGrid -> ContentPage -> TabbedPage -> NavigationPage -> Detail ->MasterDetailPage

05-19 11:50:18.244 I/MonoDroid(18919): UNHANDLED EXCEPTION: 05-19 11:50:18.315 I/MonoDroid(18919): System.NullReferenceException: Object reference not set to an instance of an object. 05-19 11:50:18.315 I/MonoDroid(18919): at Syncfusion.SfDataGrid.XForms.Droid.ExtendedScrollViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00061] in <06a482e9dc85455ca0980f1e00290059>:0 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:196 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:84 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:217 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:68 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:335 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:199 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:84 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:217 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:68 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:335 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:199 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:84 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:217 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:68 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:335 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:199 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Support.V4.App.FragmentManager fragmentManager) [0x00031] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:325 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.AppCompat.FragmentContainer.OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) [0x00008] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FragmentContainer.cs:67 05-19 11:50:18.315 I/MonoDroid(18919): at Android.Support.V4.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_inflater, System.IntPtr native_container, System.IntPtr native_savedInstanceState) [0x00022] in <7e083afc7c9045f59e01d9c14931060d>:0 05-19 11:50:18.315 I/MonoDroid(18919): at (wrapper dynamic-method) System.Object:19102082-9d9a-4f46-966d-8126e496189a (intptr,intptr,intptr,intptr,intptr) 05-19 11:50:18.355 W/art (18919): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable 05-19 11:50:18.359 D/Mono (18919): DllImport searching in: '__Internal' ('(null)'). 05-19 11:50:18.359 D/Mono (18919): Searching for 'java_interop_jnienv_throw'. 05-19 11:50:18.359 D/Mono (18919): Probing 'java_interop_jnienv_throw'. 05-19 11:50:18.359 D/Mono (18919): Found as 'java_interop_jnienv_throw'.




Tiziano Cristini
Replied On May 19, 2017 11:17 AM UTC

Hello,
I've strange issue on android only platform.
I've sfDataGrid -> ContentPage -> TabbedPage -> NavigationPage -> Detail ->MasterDetailPage

05-19 11:50:18.244 I/MonoDroid(18919): UNHANDLED EXCEPTION: 05-19 11:50:18.315 I/MonoDroid(18919): System.NullReferenceException: Object reference not set to an instance of an object. 05-19 11:50:18.315 I/MonoDroid(18919): at Syncfusion.SfDataGrid.XForms.Droid.ExtendedScrollViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00061] in <06a482e9dc85455ca0980f1e00290059>:0 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:196 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:84 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:217 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:68 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:335 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:199 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:84 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:217 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:68 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:335 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:199 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:289 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:84 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:217 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:68 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:335 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00111] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:199 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:137 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Support.V4.App.FragmentManager fragmentManager) [0x00031] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Platform.cs:325 05-19 11:50:18.315 I/MonoDroid(18919): at Xamarin.Forms.Platform.Android.AppCompat.FragmentContainer.OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) [0x00008] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FragmentContainer.cs:67 05-19 11:50:18.315 I/MonoDroid(18919): at Android.Support.V4.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_inflater, System.IntPtr native_container, System.IntPtr native_savedInstanceState) [0x00022] in <7e083afc7c9045f59e01d9c14931060d>:0 05-19 11:50:18.315 I/MonoDroid(18919): at (wrapper dynamic-method) System.Object:19102082-9d9a-4f46-966d-8126e496189a (intptr,intptr,intptr,intptr,intptr) 05-19 11:50:18.355 W/art (18919): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable 05-19 11:50:18.359 D/Mono (18919): DllImport searching in: '__Internal' ('(null)'). 05-19 11:50:18.359 D/Mono (18919): Searching for 'java_interop_jnienv_throw'. 05-19 11:50:18.359 D/Mono (18919): Probing 'java_interop_jnienv_throw'. 05-19 11:50:18.359 D/Mono (18919): Found as 'java_interop_jnienv_throw'.




Problem solved checking if Datagrid.View is not null.

        private void GridContacts_GridViewCreated(object sender, GridViewCreatedEventArgs e)
        {
            if (GridContacts.View != null)
            {
                GridContacts.View.Filter = FilterContacts;
                GridContacts.View.RefreshFilter();
            }

            GridContacts.ColumnSizer = ColumnSizer.Star;
        }

Pavithra  Sivakumar [Syncfusion]
Replied On May 22, 2017 12:56 PM UTC

Hi Tiziano, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your query. GridViewCreated event is triggerd only when view is not a null. Could you please confirm in your side you have installed only SfDataGrid.XForms assemblies in your Forms project? If we have installed Xamarin.Android dll’s also in XForms project, The application will be crashed due to internal class conversion because SfDataGrid.Android.dll and SfDataGrid.XForms.dll have ScrollViewer class. Please refer the below UG lick for using SfDataGrid in your application.   
 
 
Please let us know, if you may have any other queries. 
 
Regards, 
Pavithra S 


NIKOLAY SOLDATKIN
Replied On October 3, 2018 10:25 AM UTC

Same issue on 16.1.0.37

ERROR:System.NullReferenceException: Object reference not set to an instance of an object.
  at Syncfusion.SfDataGrid.XForms.Droid.ExtendedScrollViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00061] in <c79ce49d08134e148482c67f9a3e5ca0>:0 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000b1] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:176 ...

NIKOLAY SOLDATKIN
Replied On October 3, 2018 10:57 AM UTC

Same on version 16.3.0.21
ERROR:System.NullReferenceException: Object reference not set to an instance of an object.
  at Syncfusion.SfDataGrid.XForms.Droid.ExtendedScrollViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00061] in <a4cdbca77fc444039fd1c88e532a45cd>:0 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000b1] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:176 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:125 
  at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x00024] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\Platform.cs:318 
  at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00044] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:97 
  at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00104] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:231 
  at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:76 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) [0x00007] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:385 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000ce] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:179 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:125 
  at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x00024] in D:\agent_work\1\s\Xamarin.Forms.Platform.Android\Platform.cs:318 


Vigneshkumar Ramasamy [Syncfusion]
Replied On October 4, 2018 11:14 AM UTC

Hi Nikolay, 
 
Thanks for your update. 
 
We checked your query, the exception you shared will occur, if the Xamarin.Android NuGet is installed in the Xamarin.Forms.Android renderer project. So, Please check whether you have installed the Syncfusion.SfDataGrid.Xamarin NuGet in your sample as per the below screenshot.  
 
 
 
We have prepared the sample using SfDataGrid, you can download the same from the below link. If the issue still exists in your side, please provide us with the details, properties being set to the SfDataGrid and SfDataGrid.Columns, the view or layout to which SfDataGrid is added and the replication procedure to reproduce the issue.  
 
Sample Link: DataGrid_127832
 
 
Please let us know if this helpful. 
  
Regards, 
Vigneshkumar R  
 


Elisabeth
Replied On October 26, 2018 10:10 PM UTC

Hi,

Is this issue fixed?

I have the same error with latest version on Xamarin Forms Android project.

Regards,
Elisabeth

Vigneshkumar Ramasamy [Syncfusion]
Replied On October 29, 2018 10:45 AM UTC

Hi Elisabeth 
 
Thanks for contacting Syncfusion support. 
 
As mentioned in the previous update, this exception will occur, if the Xamarin.Android NuGet is installed in the Xamarin.Forms.Android renderer project. So, Please check whether you have installed the Syncfusion.SfDataGrid.Xamarin NuGet in your sample as in the previous attached image and please check the previous attached sample also. 
 
Please let us know if this helpful. 
 
Regards 
Vigneshkumar R 


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.

Warning Icon 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.Close Icon

;