views:

325

answers:

1

Hi, im using a ComboBox for a feature in my application, and i have AutoCompleteMode="Suggest".

However, after i type in the textbox for a search, i need to press ENTER twice to postback and show some results. This is the default behavior, like its shown in the oficial demonstration. In my opinion, its kinda annoying and not intuitive...

Anyone have a clue how to avoid this behavior, and press just one time?

Thanks in advance

+1  A: 

Change the AutoPostback attribute of the control to true. This will trap the tab key, which works because the control loses focus.

I doubt there is a good way to trap the enter key for this, unless you're up for breaking open the source code and performing some modifications.

<ajaxToolkit:ComboBox ID="ComboBox1" runat="server" 
     AutoPostBack="True" 
     DropDownStyle="DropDownList" 
     AutoCompleteMode="SuggestAppend" 
     CaseSensitive="False" 
     CssClass="" 
     ItemInsertLocation="Append" ... >
Robert Harvey
Unfortunatly, i have tried that, and doesnt work. I have tried with other properties, but also without success.
Tom S.
The tab key works in the demo, if AutoPostBack=true. Most people who don't know this will just click the Submit button.
Robert Harvey