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?
JNJayaleshwari N Syncfusion Team February 20, 2019 07:25 AM
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.
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.