This is a migrated thread and some comments may be shown as answers.

TextBox AutoComplete

7 Answers 438 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 12 Aug 2009, 09:56 PM
We were using the Ajax Control Toolkit AutoComplete Extender, but it no longer displays properly with the .NET 3.5 release (May 2009), and it no longer has any cross-browser support.  So, we need an alternative that works exactly like the original did.  I looked at the info in the thread at:

http://www.telerik.com/community/forums/aspnet-ajax/combobox/combobox-inside-grid-with-load-on-demand.aspx

but the solution does not work like the original extender.  In fact it appears that it is not possible to get the ComboBox to work in this manor.  The primary purpose of the control is textual input, with the option to select suggestions from the dropdown to populate the text box (just like Bing and Google).  I tried to get the combo box to work in this manor, but the control constantly reverts control to the dropdown which makes it impossible to change the text in the text box.  Is it possible to get the ComboBox to work exactly like the old Ajax Control Toolkit AutoComplete Extender did?

If not, is there an extender like this for the Input control?

7 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 13 Aug 2009, 01:44 PM
Hi Bill,

I suggest you check this online demo. Is that what you are trying to achieve? Additionally you can check this demo as well which shows the different modes of autocomplete behavior.

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Will
Top achievements
Rank 1
answered on 13 Aug 2009, 07:46 PM
Hey Atanas,

The first demo that you listed appears to be very similar and might work.  I've seen the second demo and it was what I was trying to use w/o any luck.  We are using it exactly like Bing and Google do for our search box.  I'll let you know if we run into any problems.

Thanks,
Bill
0
Will
Top achievements
Rank 1
answered on 14 Aug 2009, 01:47 AM
Hey Atanas,

That worked out great.  I made the changes and it looks pretty good (http://www.beheard.com/).  There are a couple minor issues though.  Pressing ENTER from the ComboBox does not submit the page, which may be a bug in the javascript behind the control.  Also, when I allow the dropdown list to be collapsable by just specifiying a maximun height, it displays as a thin gray line when there aren't any items in the list.  I would think that the dropdown should be hidden when the list is empty.  The latter is just cosmetic, but the lack of a submit on ENTER may confuse people.

Thanks,
Bill
0
Veselin Vasilev
Telerik team
answered on 14 Aug 2009, 07:56 AM
Hi Bill,

You can subscribe to the OnClientKeyPressing event of the RadComboBox and if the entered key is Enter (keyCode == 13) then submit the form:

<telerik:RadComboBox ID="RadComboBox1" runat="server"  
    OnClientKeyPressing="(function(sender, e){ if (e.get_domEvent().keyCode == 13) document.form1.submit(); })" 
    AllowCustomText="true"


All the best,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eliza Sahoo
Top achievements
Rank 1
answered on 01 Jun 2010, 11:57 AM
The solution is to add autocomplete="off" attribute to textbox tag, which will help to stop auto suggestion behaviour for that particular textbox.
And if you want to stop that behaviour for all the textboxes that are present inside a form then add autocomplete="off" attribute to form tag.
 
According to HTML specifications, autocomplete is an unrecognized attribute which was originally created by Microsoft (feature of remembering what you have entered in previous text fields with the same name, available first in Internet Explorer) and has adopted by all other major modern browsers (except Opera).
0
Peter
Top achievements
Rank 1
answered on 16 Nov 2011, 01:00 PM
In reply to second post (by Atanas Korchev).

Thanks for the demos. First link I dont understand, its no autocomplete textbox. Second looks good. In my case I would like to get the list of elements from a web service and put that in a cache because it will only change at night time in batch job. How to set that up so that the data source will be the cache element?
0
Cat Cheshire
Top achievements
Rank 1
answered on 16 Nov 2011, 01:57 PM
Tags
ComboBox
Asked by
Will
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Will
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Eliza Sahoo
Top achievements
Rank 1
Peter
Top achievements
Rank 1
Cat Cheshire
Top achievements
Rank 1
Share this question
or