Also posted here:
https://feedback.telerik.com/Project/168/Feedback/Details/258349-ios-datagrid-causes-nullreferenceexception-when-navigating-away
And here:
https://github.com/xamarin/Xamarin.Forms/issues/4178
Looks like there was a regression sometime between Xamarin.Forms 3.2.0.839982 and version 3.3.0.912540 with the DataGrid. After a DataGrid becomes visible on a page (or just on a page that becomes visible, even if the DataGrid itself is set to IsVisible = false), a NullReferenceException occurs if you navigate away or switch tabs in a RadTabView. Seems to only happen on iOS, and started happening when I upgraded from Xamarin.Forms from 3.2.0.839982 to version 3.3.0.912540. Possibly a Xamarin.Forms bug and not a Telerik bug.
In case anyone else has the same issue, the workaround for me is just to go back to Xamarin.Forms 3.2.0.839982 (not sure if the issue occurs in the other 3.2.* version in between).
9 Answers, 1 is accepted
This is occurring because of a bug in Xamarin.Forms 3.3, we have opened an issue with Microsoft and the Xamarin team has already worked on a fix. You can follow this conversation on GitHub here: https://github.com/xamarin/Xamarin.Forms/issues/4146
As you mentioned, the only workaround until Xamarin releases an update is to roll back to 3.2.
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
I'm working with 3.3.0.967583 but when the tab is selected, I get the null on iOS. Android is working good
I just check the releases notes on 3.3.0.967583 and they said that is fixed but the problem is still there
https://developer.xamarin.com/releases/xamarin-forms/xamarin-forms-3.3/
Github #4146 - "iOS: NullReferenceException is thrown when setting the element of the renderer to null after upgrading to 3.3" (#4179)
I have just checked the setup with DataGrid that raised the exception with 3.3.0.967583 and it seems resolved. I have attached my test app, could you download it and test it on your side? What are the differences from the scenario you have?
I'm looking forward to your reply.
Regards,
Yana
Progress Telerik
Hi Yana, i found that the GroupDescriptor is giving me the null exception
<telerikGrid:RadDataGrid.GroupDescriptors>
<telerikData:PropertyGroupDescriptor PropertyName="**FIELD**" />
</telerikGrid:RadDataGrid.GroupDescriptors>
I comment this code and the app start to work, can you check please
Thank you for the follow-up. I am glad to hear you've managed to resolve it.
Regards,
Yana
Progress Telerik