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

ComboBoxAdv autocomplete with DropDownList

Hi -
How do i get autocomplete behavior with ComboBoxAdv with the style set to DropDownList? The user has to be limited to the choices in the bound datasource.
I just upgraded to 4.4 and noticed an autocomplete property exists, but i don't get the autocomplete behavior unless the style is dropdown.
Thanks,
Julie

5 Replies

AR Anupama Roy Syncfusion Team December 19, 2006 05:40 PM UTC

Hi Julie,

Though ComboBoxAdv supports AutoComplete,it does not allow you to have any customizations with regard to AutoComplete.In earlier versions also ComboBoxAdv was supporting an internal AutoComplete.However,some of our customers wanted an option to disable the AutoComplete functionality and for that,in 4.4 we have added an AutoComplete property which you have noticed.

You can go for the ComboBoxAutoComplete control which supports more AutoComplete functionalities or you can use the AutoComplete component on a windows comboBox control.

Please feel free to get back to us if you need more information on this.

Best Regards,

Anu


AD Administrator Syncfusion Team December 19, 2006 08:27 PM UTC

Hi -
thanks for your response.
I'm not trying to get any custom behavior, just standard autocomplete behavior when the style is DropDownList. We use the ComboBoxAdv control instead of the windows control because of it's flat visual style options and border color property.
Is there a combobox control where we can get the same control over the look of the combobox and get autocomplete behavior with style dropdownlist?
Thanks,
Julie


AR Anupama Roy Syncfusion Team December 20, 2006 11:33 AM UTC

Hi Julie,

If the reason you want to go for a DropDownList style is to prevent invalid entry,then you can handle the TextChanged event of ComboBoxAdv and do a validation as shown below.Here it clears the value if it is not there in the list.

private void comboBoxAdv1_TextChanged(object sender, System.EventArgs e)
{
if(-1==this.comboBoxAdv1.FindStringExact (this.comboBoxAdv1.TextBox.Text,true))
{


this.comboBoxAdv1.TextBox.Clear ();

}
}

Kindly let us know if you need further assistance.

Download Sample

Best Regards,

Anu.



AD Administrator Syncfusion Team December 22, 2006 07:01 PM UTC

Hi -
thanks for the response. However, clearing the text is not very user friendly. What i really need is to duplicate the normal autocomplete behavior and ignore the nonmatching text change, leaving whatever the user has correctly typed in (with the autocomplete filled in). So the event i really need is TextChanging (so i can cancel), not TextChanged.
I don't see that exposed.
Any other ideas?
Julie


AR Anupama Roy Syncfusion Team January 3, 2007 04:01 AM UTC

Hi Julie,

Sorry for the delay in getting back to you.

Currently we do not have a TextChanging event that can be canceled for non matching Text.Handling TextChanged event was just a workaround and I am sorry that it does not fulfill your exact requirement of having DropDownList style.

Thank you for your patience.

Best Regards,

Anu.

Loader.
Live Chat Icon For mobile
Up arrow icon