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.

ItemSource not binding converting from ListView to sfListView

Thread ID:





132830 Sep 23,2017 09:48 PM Sep 25,2017 11:38 PM Xamarin.Forms 3
Tags: SfListView
Russ Fustino
Asked On September 23, 2017 09:48 PM

I am converting a native Xamarin Forms ListView in my application and replacing with sfListView ... when I run it, the binding no longer works as it just repeats the collection name over and over. An ideas? Here is my XAML which works when using <ListView instead of <syncfusion:SfListView

        <StackLayout Padding = "5,10"
            <Label Text = "Official Videos"
            <syncfusion:SfListView x:Name="mylistView" ItemsSource = "{Binding YoutubeItems}"
                            <StackLayout Orientation = "Vertical"
                            <Label Text = "{Binding Title}"

ListView no longer displays values....

Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On September 25, 2017 01:55 AM

Hi Russ, 
Thank you for using Syncfusion products. 
We have checked with your reported query “Binding items inside ItemTemplate does not work” from our side and referred the attached code snippets. We would like to let you know that you have wrongly bound Xamarin.Forms ListView’s ItemTemplate instead of Synfusion SfListView’s ItemTemplate. Due to this, the binding is not set for the items inside ItemTemplate property as the BindingContext and ItemsSource of ListView will be null. You can use the SfListView’s ItemTemplate property as like below code example. 
Code example[XAML]: 
<syncfusion:SfListView x:Name="listView" ItemSize="70" ItemSpacing="0,0,5,0" 
                     ItemsSource="{Binding ContactsInfo}"> 
        <Grid x:Name="grid" > 
           <Label LineBreakMode="NoWrap" Text="{Binding ContactName}"/> 
Please let us know if you require further assistance. 
G.Muthu Kumaran. 

Russ Fustino
Replied On September 25, 2017 05:12 PM

Awesome. I knew it was something simple. Much appreciated and it works now.

Dinesh Babu Yadav [Syncfusion]
Replied On September 25, 2017 11:38 PM

Hi Russ, 
Thanks for the update. 
Dinesh Babu Yadav 


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.