2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
DataForm picker editor will be loaded for the enum property type, by default. You can also load list or complex type by using the GetSource override method of SourceProvider class and set it to SourceProvider property of data form which is used to set the ItemsSource of picker editor.
It is not possible to directly use async/await method for setting the ItemsSource of picker editor other than enum type, since the return type of GetSource override method is not supported as asynchronous method. Instead, it is possible to return a list of items included in the asynchronous method using the GetSource override method.
Here, the CityName property is used as picker editor.
In the AutoGeneratingDataFormItem event, you need to set the DisplayMemberPath and ValueMemberPath property values when DataFormPickerItem is complex type property.
Refer to the following code to load the picker ItemsSouce asynchronously using the SourceProvider class.
Refer to the following code example for binding the DataObject and registering property using the RegisterEditor method as picker in DataForm.
Note: Picker editor is not supported in Xamarin.Forms.UWP platform.
You can refer to the DataForm user guide documentation to know more about picker: https://help.syncfusion.com/xamarin/sfdataform/editors#picker-editor
To download the sample click PickerItemsOnAsyncLoad
|
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.