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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Value Not Populating

Thread ID:

Created:

Updated:

Platform:

Replies:

150166 Dec 23,2019 02:19 PM UTC Jan 2,2020 09:40 AM UTC Xamarin.Forms 7
loading
Tags: SfComboBox
Chris
Asked On December 23, 2019 02:19 PM UTC

Hi,

I keep having a problem over multiple versions and I keep reverting back to using the Xamarin picker control. so I'd like to get to the bottom of it.

I'm currently using version 17.3.0.34 and the data populates, the drop down works but when I am modifying a record the value doesn't pre-populate.

Here the XAML I use: 

<combobox:SfComboBox x:Name="cmbRegion" Grid.Column="1" Grid.Row="2" DataSource="{Binding MovieRegionLookupList}" DisplayMemberPath="RegionName"  SelectedValuePath="TableKey" MultiSelectMode="None" SelectedValue="{Binding DataSource.Region}" />

For transparency, I am using prism framework and am collecting the data for the drop down in the constructor.

For every other control I don't have an issue it is literally just the combobox. 

Any assistance would be grateful, 

Thanks

Chris



Chris
Replied On December 23, 2019 05:12 PM UTC

A little more information.

I have multiple comboboxes used inside the tab control and across different tab pages.

When deploying to UWP none of the comboboxes load with a value, although when deploying to Android and viewing directly on my phone the first combo box on tab 2 loads perfectly but the others don't.

I hope this might be of use.

Hemalatha Marikumar [Syncfusion]
Replied On December 24, 2019 11:42 AM UTC

Hi Chris,

Greetings from Syncfusion.

Query 1: Modifying a record the value doesn't pre-populate. 
 
We have checked the reported query and we have suspected that the reported issue is about to modified changes on data source of ComboBox is not updated properly. With this case, we have prepared the sample and checked but we were unable to reproduce the same. Tested sample has been updated in below

Sample Link:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBox_Sample1118989914 
 
Please check and if we misunderstood your query, please update us with more details about your reported issue and also ensure the below updated things 
 
1.       Did you added the PropertyChanged for ViewModel DataSource’s property which is populated with ComboBox ? 
2.       Is Pre-populated word about to modify the entire collection of ComboBox or else any adding/removing the few things from existing collection ? 

Query 2: The first SfComboBox on tab 2 loads perfectly but the others don't.

We are not clear with your requirement, Can you please provide details for Query 2?. Are you using the DataTemplate for suggestion box in SfComboBox and this issue occurred initially?

Since we are not aware of your exact application scenario, therefore, we ask you to try our sample and may you kindly revert to us by changing the sample depending on your request along with the replication steps. Which will be more helpful for us to analyze further and provide an appropriate solution. 
 
Regards, 
Hemalatha M. 


Chris
Replied On December 24, 2019 03:38 PM UTC

Hi,

I've created a blank application demonstrating my problem with the values not populating - the drop down lists are populated from calls to 2 different endpoints.

My demonstration is done based on my understanding of the documentation.

I hope the sample code makes this clearer.

Thanks

Attachment: SFXamIssues_c20baffe.zip

Hemalatha Marikumar [Syncfusion]
Replied On December 30, 2019 12:22 PM UTC

Hi Chris, 
 
Thanks for your update.

We have checked the reported issue in SfComboBox from our side with the provided sample. We have noticed that the below highlighted code has not been executed for Android. Due to that DataSource not updated for SfComboBox in Android, so the reported issue has been reproduced. In UWP the below code executed properly, and the suggestion has been displayed in SfComboBox.

Code Snippet: 
        public async Task LoadMovieLookups() 
        
            var movieRatingRequestMessage = CreateRequestMessage(new Uri($"{BaseAddress.ToString()}MovieLookups/Ratings"), HttpMethod.Get); 
            var movieRatingResponse = await MakeRequest<List<MovieRating>>(movieRatingRequestMessage.RequestMessage, movieRatingRequestMessage.TokenSource.Token); 
            if (movieRatingResponse.Success) 
            { 
                MovieRatingLookupList = new ObservableCollection<MovieRating>(movieRatingResponse.Result); 
            } 
  
            var movieRegionRequestMessage = CreateRequestMessage(new Uri($"{BaseAddress.ToString()}MovieLookups/Regions"), HttpMethod.Get); 
            var movieRegionResponse = await MakeRequest<List<MovieRegion>>(movieRegionRequestMessage.RequestMessage, movieRegionRequestMessage.TokenSource.Token); 
            if (movieRegionResponse.Success) 
            { 
                MovieRegionLookupList = new ObservableCollection<MovieRegion>(movieRegionResponse.Result); 
            } 
  
        

Can you please check this from your side? And let us know the details. 
 
Regards, 
Hemalatha M. 


Chris
Replied On January 1, 2020 03:14 PM UTC

I've re-uploaded the project, as there were a couple of changes that needed to be made.

During the tests I've made the following is true:

  • Combobox data sources populate in both UWP and Android.
  • None of the values of the comboboxes are populated in either UWP or Android

Thanks 

Chris

Attachment: SFXamIssues_3fee6e43.zip

Chris
Replied On January 1, 2020 05:34 PM UTC

Ok, it seems as though the SelectedItem was causing the issue here. 

I had a look at some older posts regarding the same issue and that seemed to be the resolution so tried it on mine and it's worked. 

I do find this a more cumbersome way of doing this task as it's extra steps from what I used to do in Winforms that I never considered.

Thanks for your help with this and please close this issue

Chris

Hemalatha Marikumar [Syncfusion]
Replied On January 2, 2020 09:40 AM UTC

Hi Chris, 
 
Thanks for your update. 
 
Please let us know if you need any further assistance. 
 
Regards, 
Hemalatha M. 
 


CONFIRMATION

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