Solved

ASP.NET DropDownList Typing Delay

Posted on 2014-10-23
4
245 Views
Last Modified: 2014-10-29
I am using an asp:dropdownlist control to display a list of codes.  Users can type in the control and as they type the list re-positions to an item relating to what they have typed.  My problem is that the timing between key presses seems to short and sometimes the will re-position using a later keystroke as its starting point.  ie. ABC is typed quick enough would position in the list to items starting with ABC, but if the time between B & C is too long the list with move to items starting with C.
0
Comment
Question by:WH_Tech
4 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40400034
Perhps there are so many items in the dropdown list that there is a lag doing the scan.  In any case there is no way for us to do any diagnostics without a link to the page.

Cd&
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 40400132
Is there a property to set the listening time.  In the end, this is a client side and serverside issue.    Perhaps using a library like angular may give you more adjustments to work with https://visualstudiogallery.msdn.microsoft.com/5af151b2-9ed2-4809-bfe8-27566bfe7d83 or https://twitter.github.io/typeahead.js/, or jquery ui's version.    I know that has the ability to set the time to wait.
0
 
LVL 28

Expert Comment

by:sammySeltzer
ID: 40400167
WH,

It looks like you are querying a large recordset and an attempt to sample by such a small filter creates a bottleneck.

Are you using jquery ui version?

If yes, your problem is on this section of the code.

                         source: function( request, response ) {
                             var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
                             response( select.children( "option" ).map(function() {
                                 var text = $( this ).text();
                                 if ( this.value && ( !request.term || matcher.test(text) ) )
                                     return {
                                         label: text.replace(
                                             new RegExp(
                                                 "(?![^&;]+;)(?!<[^<>]*)(" +
                                                 $.ui.autocomplete.escapeRegex(request.term) +
                                                 ")(?![^<>]*>)(?![^&;]+;)", "gi"
                                             ), "<strong>$1</strong>" ),
                                         value: text,
                                         option: this
                                     };
                             }) );
                         },

Open in new window


First, indicate if this assumption is correct.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question