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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Nullable Enums

Thread ID:





142782 Feb 19,2019 05:50 PM UTC Feb 20,2019 12:25 PM UTC Xamarin.Forms 1
Tags: SfDataForm
Anibal de Deus
Asked On February 19, 2019 05:50 PM UTC

In my SfDataForms, if I use an Enum to fill a field, it works as expected, showing a Combo where I can select any valid value of my Enum, but sadly it's initially rendered with a value. But if I use a nullable enum, the field is initially rendered empty, but the combobox is not shown, a generic text input box is shown.

How can I have a Enum with combobox but starting with empty value?

Jayaleshwari N [Syncfusion]
Replied On February 20, 2019 12:25 PM UTC

Hi Anibal,  
We have checked your query for having Enum type with combobox and starting with empty value in SfDataForm Xamarin Forms. In DataForm, if enum type is binded, the first value in the enum will be displayed in the view in combobox. However, your requirement can be achieved by using CustomEditor with DataFormDropDownEditor. In the sample, enum type is passed as collection of string and empty string is set as initial value such that combobox will be starting with empty value. We have prepared the sample for the same. Kindly find the sample below.  
Sample: ComboBoxEditor
You can refer our online user guide documentation to know more about using ComboBox in SfDataForm  
Please let us know whether the provided solution satisfies your requirement. If not, kindly revert us back with more details related to your requirement by modifying the provided sample with screenshots (if possible). It will be helpful for us to provide you possible solution. 
Jayaleshwari N. 


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