binding an object list to the sfPicker

If I have an object with multiple properties and I want to bind that object to the SfPicker control but then show only 1 of the property values in the list... how do I do that?

For example if I have this class:

public class Person
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
}

and then  I have this list defined:
List<Person> persons = new List<Person>();
....
....
....

How do I bind persons to the picker control and display only the LastName?

1 Reply

PA Paul Anderson S Syncfusion Team August 10, 2018 02:01 PM UTC

Hi Derek, 
 
Thank you for using Syncfusion products. 
 
We can achieve your requirement in SfPicker using the DisplayMemberPath property in which we can assign the attribute that need to be displayed. Currently we have this support in Android and iOS platform and will be available in our Volume 3 2018 release for UWP platform.  
 
Please have the sample from the below link 
 
Regards, 
Paul Anderson 


Loader.
Up arrow icon