How To Add A Scrollbar to an MS AJAX ToolKit AutoCompleteExtender

Create a DIV with it styled with an overflow-y:scroll to allow for vertical scrolling and set the height you want the dropdown to be. Within the AutoCompleteExtender define the CompletionListElementID equal to the ID of the DIV you just created.

<asp:TextBox runat="server" ID="txtBarcodeProduct" Width="400px"
CssClass="barcodeInput" TabIndex="5"></asp:TextBox>

<div id="listPlacement" style="height:100px; overflow-y:scroll;" ></div>

<cc1:AutoCompleteExtender
runat="server"
ID="autoComplete1"
TargetControlID="txtBarcodeProduct"
ServicePath="~/webservices/AutoCompleteNew.asmx"
ServiceMethod="GetCompletionList"
MinimumPrefixLength="1"
CompletionInterval="1000"
EnableCaching="true"
CompletionSetCount="12"
CompletionListElementID="listPlacement"
></cc1:AutoCompleteExtender>
Advertisements

9 thoughts on “How To Add A Scrollbar to an MS AJAX ToolKit AutoCompleteExtender

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s