Link to home
Start Free TrialLog in
Avatar of Jeyakumar_mcp
Jeyakumar_mcp

asked on

Scroll issue on AutoCompleteExtender with AutoPostBack TextBox

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

Steps to reproduce:
1. Add a TextBox to your ASPX page with AutoPostBack="true".
2. Add an AutoCompleteExtender and specify the TextBox above as the target control.
3. Create a new web service method and specify the appropriate ServicePath and ServiceMethod on your AutoCompleteExtender.
4. Specify all the appropriate attributes on your AutoCompleteExtender as needed so that typing some text displays a drop down.
5. From the web service method, make sure you will be returning a large number of items, so that the AutoCompleteExtender's drop down list displays a scrollbar.
6. Click or tab into the TextBox and type some text so that the drop down (with scroll bar) is displayed.
7. For good measure, first try simply pressing the arrow down key until the drop down starts scrolling on its own. This works fine, no problem.
8. Now, instead of arrowing down, click the scrollbar and begin scrolling.
9. All of a sudden, it appears that the focus is lost from the TextBox control, which naturally causes the AutoPostBack behavior to kick in. This causes the drop down to disappear and you are never able to scroll in the manner in which you intended.

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

Thanks!
Avatar of Jeyakumar_mcp
Jeyakumar_mcp

ASKER

Hi experts! any suggestion?
ASKER CERTIFIED SOLUTION
Avatar of masterpass
masterpass
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
good