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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Clearing selection using MVVM

Thread ID:





123847 Apr 26,2016 01:51 PM UTC Apr 27,2016 01:40 PM UTC WPF 1
Tags: ComboBoxAdv
Peter Viau
Asked On April 26, 2016 01:51 PM UTC

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" />





Venkateshwaran Ramdoss [Syncfusion]
Replied On 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. 


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