Picker shows 0 initially when an option is an empty string

When using a SourceProvider to add data for a picker and an item has an empty string (so that the validation forces the user to pick an option) the empty picker option shows '0' initially until there is user interaction and then empties.


        if (sourceName == "PickerControl")
        {
            list.Add("");
            list.Add("Item1");
            list.Add("Item2");
            list.Add("Item3");
        }

This also happens when loading complex type property values into the picker.

I've attached a clip of this happening in an emulator.

Attachment: picker_fba99ee2.7z

1 Reply

JN Jayaleshwari N Syncfusion Team October 1, 2018 12:12 PM UTC

Hi Richard, 
 
Thanks for Contacting Syncfusion Support. 
 
We have analyzed your query “Picker shows 0 for empty string initially” from our end. We would like to know that we have used NumberPicker by default for rendering Picker in DataFormPickerEditor. Since the empty string value converted and showing as Zero. We don’t have direct support to resolve this issue. But you can achieve your requirement by using CustomEditor with Syncfusion SfPicker.  We have prepared the sample for the same. You can download from the following location 
 
 
Regards, 
Jayaleshwari N 


Loader.
Up arrow icon