SfComboBox is setting SelectedValue to null on initialization

Consider a ViewModel with

        [ObservableProperty]

        public partial string Option { get; set; } = "OptA";


and the following XAML


<SfInputs:SfComboBox

    SelectedValue="{Binding Option, Mode=TwoWay}"

    SelectionMode="Single">

    <SfInputs:SfComboBox.ItemsSource>

        <ListCollection:List x:TypeArguments="x:String">

            <x:String>OptA</x:String>

            <x:String>OptB</x:String>

        </ListCollection:List>

    </SfInputs:SfComboBox.ItemsSource>

</SfInputs:SfComboBox>


Combobox is setting Option to null after initialization. How can I proceed?


Regards,


Diego


1 Reply

MK Manikandan Kannan Syncfusion Team February 27, 2026 08:40 AM UTC

Hi Diego,

 

Thank you for your update. We have reviewed and analyzed your query. Please use SelectedItem for binding the selection in this scenario to preserve the initial value and maintain consistent selection during initialization and usage. We have attached the sample for your reference, please check it and let us know if you have any further concerns.

 

Best Regards,

Manikandan Kannan.


Attachment: SfComboBoxIssue_f81829de.zip

Loader.
Up arrow icon