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.

Can't get DataGrid to work (Android)

Thread ID:

Created:

Updated:

Platform:

Replies:

127832 Dec 12,2016 10:11 AM May 22,2017 08:56 AM Xamarin.Forms 8
loading
Tags: SfDataGrid
Oliver Melcher
Asked On December 12, 2016 10:11 AM

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 08:16 AM

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 08:29 AM

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 05:45 AM

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 01:01 AM

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 05:03 AM

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 06:04 AM

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 07:17 AM

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 08:56 AM

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 


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.

;