- Home
- Forum
- Xamarin.Forms
- SelectedItem doesn't work
SelectedItem doesn't work
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?
SIGN IN To post a reply.
3 Replies
MK
Muneesh Kumar G
Syncfusion Team
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: 17.1.0.43
Disclaimer:
Please note that we have created this patch for version 17.1.0.43 specifically to resolve the following issue reported in this forum.
Disclaimer:
Please note that we have created this patch for version 17.1.0.43 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.
Thanks,
Muneesh Kumar G.
RA
Raphael
May 10, 2019 05:03 AM UTC
Hi,
Attachment: Pictures_5c60330d.rar
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
MK
Muneesh Kumar G
Syncfusion Team
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
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.
Regards,
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.
Regards,
Muneesh Kumar G.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
RA Raphael
- May 8, 2019 07:55 AM UTC
- May 10, 2019 06:51 AM UTC