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

Clearing selection using MVVM

I have this Combobox in xaml and I need to clear the selection after an edit cancel or after save.

I tried setting SelectProduct = null but it doesn't seem to work after the first time.
 public string  SelectedProduct
            get { return _productName; }
                _productName = value;

          <syncfusion:ComboBoxAdv Name="ProductComboBox"
                                       VerticalAlignment="Center" Margin="3.5,0,0,0" 
                                        ItemsSource="{Binding ProductsList, Mode=TwoWay}"
                                        SelectedValue="{Binding  SelectedProduct, Mode=TwoWay}"
                                          SelectedValuePath="Product1" >




                                        <TextBlock Margin="0"
                                               Text="{Binding Product1}"
                                               TextWrapping="NoWrap" />





1 Reply

VR Venkateshwaran Ramdoss Syncfusion Team April 27, 2016 01:40 PM UTC

Hi Peter,

We have checked your provided code snippet. In this you have tried to clear the property "SelectedProduct". This won't clear the item in ComboBox. We were unable to understand your exact requirement. Could you please provide more information about your query like explaining about the exact requirement or providing sample and replication steps to reproduce the issue. It would help us to proceed further.

Venkateshwaran V.R. 

Live Chat Icon For mobile
Up arrow icon