Hi,
I've only just begun evaluating Telerik for Xamarin Forms over Syncfusion and I've immediately ran into an issue with the ListView. I'm using a DataTemplateSelector for the item template of the list and it's throwing an exception:
System.InvalidOperationException: LoadTemplate should not be null
at Xamarin.Forms.ElementTemplate.CreateContent()
at Telerik.XamarinForms.DataControlsRenderer.UWP.ExtendedListViewItem.UpdateTemplate(RadListView listView, Object dataItem)
at Telerik.XamarinForms.DataControlsRenderer.UWP.UWPListView.PrepareContainerForItem(RadListViewItem item, Object context)
at Telerik.UI.Xaml.Controls.Data.ListView.View.Controls.ListViewItemUIContainerGenerator.PrepareContainerForItem(GeneratedItemModel el
This is the list view in xaml:
<telerikDataControls:RadListView ItemsSource="{Binding Mappings.Items}"
ItemTemplate="{StaticResource CaseTemplateSelector}"
BackgroundColor="{x:Static resources:Colours.PageBackground}"
ItemTapped="CaseListItemTapped"
IsItemsReorderEnabled="True"
ReorderStarting="ReorderStarting"
ReorderEnded="ReorderEnded"
SelectionMode="None"
VerticalScrollBarVisibility="Never"
Grid.Column="0"
Grid.Row="1"/>
The template selector is added to static resources via the application resources container in App.xaml along with the DataTemplates that are returned from the OnSelectTemplate method. The OnSelectTemplate method always returns a value, or it throws an exception, a breakpoint on this method does not get hit before the exception fires.
Are there any special measures required for RadListView to use DataTemplateSelector? Switching back to the Xamarin Forms ListView works fine on all platforms (once I remove the Reorder properties in the xaml) and I haven't found anything in the documentation for this being a known issue. Is there something I'm missing or is this just not possible with RadListView?
Thanks,