Disappearing scrollbar when using autocomplete

I am using the Autocomplete extension feature to get a list of offers from my database. There is no scrollbar for this control, so I added a scrollbar in the panel (MS.net 2.0) which I attach to the autocomplete extender. Now the problem is with the srcoll panel. like this

<asp:Panel ID="autocompleteDropDownPanel" runat="server"  ScrollBars="Auto"  Height="100px" HorizontalAlign="Left" />

      

and add it to auto accompaniment like this

:CompletionListElementID="autocompleteDropDownPanel"

      

When I call my page, I get a list of suggestions and a scrollbar appears. When I click on the scrollbar or try to drag everything just disappears.

Am I doing something wrong? Is there any other way to add a scrollbar to my autocomplete extension control.

Any hints would be very helpful.

+1


source to share


5 answers


This doesn't answer your question directly, but I would ask if you are sure that expander autocomplete is the best control to be used in this scenario.

From a usability point of view, a big part of autocomplete is that I can type 3-4 characters, see multiple inputs available, and easily select them with my keyboard with a few down keys.



If you are showing more items in the autocomplete list than can be easily viewed on the screen, I'm not sure the fix is ​​to add a scrollbar.

In our scenario, we had a list of 2800 names that were available in autocomplete. We limited the number shown to 20, but set it MinimumPrefixLength

to 1. This meant that when the user typed one character, they would see an autocomplete list, which simply lets them know that the text field they are typing on has this ability. The list of results in the list becomes really useful only if the user has entered 3-4 characters.

+1


source


I have a similar problem, it doesn't seem to have been resolved.

Clicking on the AutoCompleteExtender scrollbar causes a postback when attached to a TextBox, where AutoPostBack = "true".

Steps to reproduce:



  • Add a TextBox to your ASPX page with AutoPostBack = "true".
  • Add AutoCompleteExtender and specify the TextBox above as the target control.
  • Create a new web service method and specify the appropriate ServicePath and ServiceMethod in your autocomplete.
  • Optionally include all the appropriate attributes in your AutoComplete Extender to print the dropdown text.
  • From the web service method, make sure you are returning a large number of items, so a scrollbar appears in the AutoCompleteExtender dropdown.
  • Click or a tab in the TextBox and enter text to bring it down (with a scroll bar).
  • For good measure, first try just pressing the down arrow key until the down arrow starts scrolling on its own. This works great, no problem.
  • Now instead of shooting down, press the scroll button and start scrolling.
  • Doh! Suddenly it looks like focus is being lost from the TextBox control, which naturally leads to the loss of AutoPostBack behavior. This causes the dropdown to disappear and you can never scroll the way you planned.

It looks like we need a way to temporarily disable the AutoPostBack behavior whenever the dropdown is displayed, or perhaps just when a person tries to scroll. Perhaps clicking on the scrollbar could set some kind of flag that would disable AutoPostback and then releasing the mouse would re-enable it. I don't know how possible this is, but it would be nice if someone had an idea.

http://www.codeplex.com/AjaxControlToolkit/WorkItem/View.aspx?WorkItemId=15161

+1


source


well this is being solved right now in visual studio 2008 sp1 ajaxtoolkit and you can scroll the scroll to enumerate but by editing the css of the CompletionListCssClass kit

overflow:auto;
height:60px;

      

+1


source


I just ran into the same symptoms when using AutoCompleteExtender

in ASP.NET 3.5 ..... it was because I had AutoPostBack=True

the scrolling feature turned off in the textbox.

(I know this is not the same scenario as the original question, but I found this from Google trying to fix my problem, so it was convenient for me to post my solution.)

+1


source


clicking on the scrolling issue in my case was fixed by setting AutoPostBack=false

to textbox. But then the AutoCompleteExtender functions disappeared. Using the property OnClientItemSelected

, I could call the javascript function that triggered the postback and all IE browser users were happy again :-)

0


source







All Articles