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
close icon

Remove DefaultSelection in AutoComplete DropDown

Hi,

If there is no text in the textbox and when drop down appears, the first element in the drop down is selected by default. How to remove this default selection? Kindly let me know. Thanks.

Regards
Kiran


6 Replies

AD Administrator Syncfusion Team August 8, 2008 10:28 AM UTC

Hi Kiran,



Thank you for your interest in Syncfusion Products.

To remove the default selection in autocomplete dropdown when the textbox is empty. We can set the selectedindex is -1 in DropdownDisplayed event in autocomplete control. Please refer the following code snippet that illustrates this:



private void autoComplete1_DropDownDisplayed(object sender, EventArgs e)
{
if(this.textBoxExt1.Text == String.Empty)
this.autoComplete1.SelectedIndex = -1;
}




Please let me know if any concerns.



Regards,

Hema



FA Faltu August 8, 2008 04:06 PM UTC

Hi Hema,

The problem still exists. When text is empty, no item in the dropdown should be selected. But consider this scenerio: dropdown is already displaying and when we delete the text, dropdown displays all the items with the first item selected by default.
I want to avoid this default selection, when there is no text.

I tried setting autoComplete.SelectedIndex = -1 in the ItemBrowsed, Customize, and DropDownDisplayed events but of no use.

Kindly let mw know how to fix this. Thanks.

Regards
Kiran




FA Faltu August 11, 2008 02:41 PM UTC

Hi,

Any information on this. Your help is highly appreciated.

Regards
Kiran



AD Administrator Syncfusion Team August 20, 2008 06:58 AM UTC

Hi Kiran,

We suspect the issue "SelectedIndex does not work properly in autocomplete" to be a defect and we have forwarded this to our development team for more analysis. We will update you in two business days with more details.

Thank you for your interest in Syncfusion Products.

Regards,
Hema



AD Administrator Syncfusion Team August 26, 2008 06:27 AM UTC

Hi Kiran,

Thank you for your patience.

The above issue has been internally fixed and this will be avalible with our next weekly development build. We will get back to you with more details once the development build is available for download.

Please let me know if any concerns.

Regards,
Hema



HK Hemaladha K Syncfusion Team September 29, 2008 10:11 AM UTC

Hi Kiran,

Sorry for the delayed response.

The above issue has been internally fixed and this will be available with our next major release Volume 4 will be on second week of October 2008.

Please let me know if any concerns.

Regards,
Hema


Loader.
Live Chat Icon For mobile
Up arrow icon