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

SelectedItem doesn't work

Thread ID:





144472 May 8,2019 07:55 AM UTC May 10,2019 06:51 AM UTC Xamarin.Forms 3
Tags: SfComboBox
Asked On May 8, 2019 08:14 AM UTC

I have a question regarding SelectedItem. I have set a combo box for an edit page using xamarin forms.

I have successfully retrieve the data from a collection and bind it in SFComboBox.as a datasasource now my is retrieving the value from database to combobox.
the combobox should display the previous data since it is an edit page. i have tried the SelectedItem but it is not showing in my combobox. 

please see the codes below

                                                     AllowFiltering="True" SuggestionMode="StartsWith" IsEditableMode="True" >
                                        TextColor="White" SelectedBackgroundColor="#990000" 
                                        DeleteButtonColor="Color.Brown" IsCloseButtonVisible="true" 
                                        CornerRadius="15" DeleteButtonPlacement="Right">

and this is how i use the selected item

 foreach (string laboratory in laboratoryList)
                if (!string.IsNullOrEmpty(laboratory))
                    cbLaboratory.SelectedItem = laboratory.TrimStart();


Athe combobox is still empty. i even directly put this cbLaboratory.SelectedItem = "FBS"; but still not working.. is it possible to display multiple selecteditems?

Muneesh Kumar G [Syncfusion]
Replied On May 9, 2019 10:52 AM UTC

Hi Raphael, 
Greetings from Syncfusion.  
We have checked the reported issue "SelectedItem doesn't work" and we were able to reproduce it in Android platform when selection mode is multi-select. We have fixed this issue and attached custom assembly and testing sample for your reference. Please find it from the below link. 
Assembly Version:

Please note that we have created this patch for version specifically to resolve the following issue reported in this forum.
This fix will be included in our upcoming Volume 2 release which will be available end of June 2019. 
Muneesh Kumar G. 

Replied On May 10, 2019 05:03 AM UTC


It is still not working. Please see attached files.

for the first photo, it shows the how the combo box setup

the second photo, it shows how the model created

the third photo, it shows the list of data that was selected.

Attachment: Pictures_5c60330d.rar

Muneesh Kumar G [Syncfusion]
Replied On May 10, 2019 06:51 AM UTC

Hi Raphael,

We have tried to replicate the reported issue "SelectedItem doesn't work" at our end using the provided patch and we are afraid that we are not able to reproduce the issue at our end. We have attached the tested sample and video for your reference.

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBox_(4)965093492.zip 
Video: http://www.syncfusion.com/downloads/support/directtrac/general/ze/TestingVideo610032250.zip

So can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to investigate further and provide you a better solution at the earliest.

Muneesh Kumar G. 


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