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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Kanban with templateselector using MVVM gets System.InvalidOperationException: 'LoadTemplate should not be null'

Thread ID:





149374 Nov 23,2019 07:06 PM UTC Nov 28,2019 02:51 AM UTC Xamarin.Forms 3
Tags: SfKanban
David Brenchley
Asked On November 23, 2019 07:06 PM UTC

I have a viewmodel with an observablecollection of Kanban cards bound to my kanban control.  I'm using a templateselector to decide which custom template to display in each column.  When I load the observablecollection with cards in the contructor of the viewmodel, it works great.  However, when I load the observable collection with cards from an async method within the viewmodel, I get the LoadTemplate error.  It doesn't even get far enough to call the OnSelectTemplate method of the templateselector.  When I change from using a templateselector and bind to specific template, it works.

So how can I use a templateselector and load the data after viewmodel initialization?

Sample of template
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms" 
    <Frame Padding="10" HasShadow="true" BackgroundColor="White" CornerRadius="0" >
            <Label Text="Howdy" />        

David Brenchley
Replied On November 23, 2019 08:01 PM UTC

Attaching one of your samples where I modified to replicate the issue.  Run the attachment, go to the Kanban Customization Tab, then press the Test Button

Attachment: KanbanFailure_fbd43234.zip

Rachel A [Syncfusion]
Replied On November 25, 2019 12:44 PM UTC

Hi David, 
Thanks for contacting Syncfusion Support. 
We can reproduce the mentioned problem. As we are validating on it, the status will be updated on 27th November 2019. 

Lakshmi Radha Krishnan [Syncfusion]
Replied On November 28, 2019 02:51 AM UTC

Hi David,


We have resolved the reported issue in sample level by setting empty item source collection at load time and set the value to that collection in button click. We have modified the sample, please download it from the following location.


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/KanbanCustomizationModified-729624630


Please let us know if you need further clarifications on this.



Lakshmi R.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon