Solved

ASP.NET DropDownList Typing Delay

Posted on 2014-10-23
4
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

730 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