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

Implementing MVVM pattern

Thread ID:

Created:

Updated:

Platform:

Replies:

144308 Apr 30,2019 05:19 AM UTC May 6,2019 09:17 AM UTC Xamarin.Forms 3
loading
Tags: SfDataForm
Ian
Asked On April 30, 2019 05:19 AM UTC

The requirement is to allow users to select options for a string field implementing either the DropDown and Picker editors in a MVVM pattern.
Kindly refer me to a example(s) of how to achieve this correctly without going down the code behind route.

Muneesh Kumar G [Syncfusion]
Replied On May 1, 2019 10:57 AM UTC

Hi Lan, 
 
Thanks for using Syncfusion products.  
 
We have prepared a sample based on your requirement using MVVM pattern. Please download the sample from the below link. 
 
 
Please let us know, if you have any other concern 
 
Regards,
Muneesh Kumar G.   
 


Ian
Replied On May 5, 2019 10:29 AM UTC

Good day,

Thank you for your response - it covers the MVVM example of a SfPicker 100%.
My requirement relates to the picker/dropdown editor found as part of the SfDataForm solution.
Typically I need to populate the items in the dropdown or picker editor with values supplied from a view model class.
So far I have only found examples of doing it behind. My own attempts to use a binding approach has failed.

xaml:      <dataform:DataFormDropDownItem Editor ="DropDown" Name="Cause" />

code behind:
         public class SourceProviderExt : SourceProvider
        {
            public override IList GetSource(string sourceName)
            {
                var ItemList = new List<string>();
              
                if (sourceName == "Cause")
                {
                    ItemList.Add("Wear and tear");
                    ItemList.Add("Manufacturer prescription");
etc

Subburaj Pandian Veluchamy [Syncfusion]
Replied On May 6, 2019 09:17 AM UTC

Hi Ian, 
 
Thank you for the update.

We have already found and working on this mentioned issue “Binding ItemSource property to the DataForm DropDown Editor not working” with high priority and logged issue report for the same. We will fix this issue and include the issue fix in our upcoming 2019 Volume 1 Service Pack 1 release which is expected to be available by mid of May 2019. We appreciate your patience until then.   

You can track the status of this report through the following feedback link,  
  
 
Regards,
Subburaj Pandian V 


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