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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

I want to clean up a SfComboBox from the selected values

Thread ID:





141440 Dec 11,2018 09:18 PM UTC Feb 25,2021 09:10 AM UTC WinForms 3
Tags: SfComboBox
Asked On December 11, 2018 09:18 PM UTC

I would like to do what with the traditional combobox is done with the command:
comboBox.SelectedIndex = -1;
In that case the text is cleaned up and the combobox is in the initial state as if there had been no selection.
I can do this when loading the form with SfComboBox.
But if I make a selection after I can no longer clean up the SfComboBox .
It gives me the error: index -1 not valid, it accepts only positive values and greater than 0



Arulraj A [Syncfusion]
Replied On December 12, 2018 08:47 AM UTC

Hi Maurizio, 

Thanks for using Syncfusion product. 

We can reproduce your reported scenario. We have confirmed this is a bug so we have logged the bug report for this issue “SfComboBox not clear the selected value when resetting the SelectedIndex” and it will be available on our upcoming main release 2018 Volume 4 which will be expected at end of this December 2018. 

Moreover, you can resolve this issue by using TextBox.Clear method. Please refer the following code example and the sample. 

Code example 

Arulraj A 

Shankar Sharma
Replied On February 23, 2021 12:47 PM UTC

Hi Syncfusion Team,

Any update on above concern, Also I am still not able to clear/reset the SfComboBox selected value by  using SelectedIndex = -1

Looking forward to hearing from you at earliest.


Elakkiya Muthukumarasamy [Syncfusion]
Replied On February 25, 2021 09:10 AM UTC

Hi Shankar, 
Thanks for your patience. 
We have checked your reported issue “SfComboBox not clear the selected value when resetting the SelectedIndex” with the latest release version setting the SFComboBox SelectedIndex is -1 the text clear properly without throwing the exception. Please refer the below sample for the same. 
Please try it with the provided sample and if you still facing this issue please share us your currently using syncfusion product version details, we will check and update you the prompt solution based on it. 


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

Live Chat Icon For mobile
Live Chat Icon