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

Clear selection once selected

Thread ID:





130212 Apr 27,2017 09:36 PM UTC May 12,2017 06:42 AM UTC WPF 7
Tags: ComboBoxAdv
Andy Johnson
Asked On April 27, 2017 09:36 PM UTC

I would like to know if there is an easy way to clear the selection once it is selected (I am using it as a Dropdown.. i.e. single selection only) and my ComboBox is bound to a list of collection..

This is my Xaml

<syncfusion:ComboBoxAdv x:Name="FirstInvestor" Margin="10,0,0,10"
                                                               Grid.Column="1" Grid.Row="0"
                                                               ItemsSource="{Binding Investors, Mode=TwoWay, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
                                                               SelectedItem="{Binding Investment.FirstInvestor, Mode=TwoWay, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
                                                               DisplayMemberPath="FullName" MaxWidth="400" 

Vinothini [Syncfusion]
Replied On April 28, 2017 12:16 PM UTC

Hi Andy, 
Thank you for using Syncfusion products. 
We have used the given code snippet with the list collection in our sample, but we were not clear about your requirement. Can you brief about your requirement of clearing the selection of SelectedItems and the property bound to SelectedItem?  
Please provide us the information, so that we can work on it to provide you a solution. 

Andy Johnson
Replied On May 1, 2017 02:19 PM UTC

Ok,I have created a solution to re-create the issue I have.. Please run the project and you will see two choices "Andy" and "Johnson". Once you select any of the choices, there is no way for us to clear the selection in case of non-required fields if I decide to not fill-in that field.ThanksAndyAttachment: ComboBoxAdv_9aea0a77.zip

Vinothini [Syncfusion]
Replied On May 2, 2017 11:13 AM UTC

Hi Andy, 
Thank you for your update. 
We can clear the SelectedItem as per your requirement by setting the SelectedItem binding property to null. We have prepared sample for this and it is available below. 

Please let us know whether this solution works. 

Andy Johnson
Replied On May 9, 2017 06:22 PM UTC

I run the sample code you provided and figured that is only the solution to provide a clear button to clear the selection..
But if you run your code and do the following steps:

  1. Select any name from the list
  2. Clear name using a button
  3. Try to select the name again.

Here there seems to be a bug where newly selected item is not being displayed. Can you please help me with this?


Vinothini [Syncfusion]
Replied On May 10, 2017 09:43 AM UTC

Hi Andy, 
We have checked the provided sample with the given steps and we could find that items can be cleared and selected again. In this case, the selected item is displayed. Could you please check with the below video and let us know whether we have missed any steps, 

Andy Johnson
Replied On May 11, 2017 01:58 PM UTC

Please look at the video from my end. Same code.

Attachment: 20170511_85512_39483216.zip

Keerthana Jegannathan [Syncfusion]
Replied On May 12, 2017 06:42 AM UTC

Hi Andy, 
We considered this defect “SelectedItem has not been updated properly in ComboBoxAdv” as bug and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
Keerthana J 


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