Solved

ASP.NET DropDownList Typing Delay

Posted on 2014-10-23
4
243 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now