This is a migrated thread and some comments may be shown as answers.

Delay when pressing the first key

5 Answers 139 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lucas County Information Services
Top achievements
Rank 1
Lucas County Information Services asked on 19 Nov 2008, 09:21 PM
Why is there a delay when pressing a key after entering the combobox? After the combobox gets focus and I press a key on the keyboard, there is a very significant delay before the control responds.

5 Answers, 1 is accepted

Sort by
0
Lucas County Information Services
Top achievements
Rank 1
answered on 20 Nov 2008, 02:54 PM
As I continue to test this problem, I have noticed that the problem only happens in IE (versions 6 and 7). FireFox seems to respond very well. If anybody has any suggestions/solutions, it would be much appreciated.
0
Lucas County Information Services
Top achievements
Rank 1
answered on 21 Nov 2008, 07:41 PM

I've determined that the load-on-demand method is the best approach since it allows for better response by the keyboard. The problem that I now have is that custom text is allowed. I have read the Load on Demand and AllowCustomText forum posting (link below). After trying that method I am back to the same problem with keyboard response, very slow. Also, the example that was provided required that all items in the list to have start with the exact same characters. Also, the combobox was populated only when it was clicked/opened.

Obviously, the solution is going to take just the right combination of properties and events. If anybody knows how to do this, please reply.

Links:
0
Simon
Telerik team
answered on 25 Nov 2008, 04:05 PM
Hi Doug Hyatt,

Are there any specific circumstances in which the issue occurs? Under which browser does it occur? Could you reproduce it in one of our live demos?

Thank you in advance.

Kind regards,
Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Lucas County Information Services
Top achievements
Rank 1
answered on 25 Nov 2008, 04:27 PM

Thanks for your response. As I mentioned in my second post, the issue seems to only be related to IE. I have also noted that it only involves large lists. Initially I had thought that my list was only 300 rows, but it's actually 1100; a HUGE difference. Obviously, the load-on-demand feature is what I needed and that resolved the problem with the keyboard response. The side effect to this is that the AllowCustomText is turned on by default (for obvious reasons), but I need to have it limited to the list. I did follow the suggestion from the forum posting below, but the keyboard problem returned.


Load on Demand and AllowCustomText

http://www.telerik.com/community/forums/aspnet-ajax/combobox/load-on-demand-and-allowcustomtext.aspx

My Resolution (so far)

  1. Set the EnableLoadOnDemand and the MarkFirstMatch properties to True. Create the OnItemsRequested function to load the data.

     

  2. Set the OnClientBlur property to the name of a JavaScript function such as "radComboBox_OnBlur."
  3. Initiate an AJAX postback from the radComboBox_OnBlur function.
  4. On the server side, verify that the item is valid. If not, reset the combox Text property to an empty string and the SelectedValue to zero. This allows for the validation control to detect that the item is incorrect.

If you have some suggestions or comments, please let me know.

Thanks!

 

0
Simon
Telerik team
answered on 28 Nov 2008, 10:17 AM
Hello Doug Hyatt,

Thank you for providing additional information.

As it turns out, the delay in your case is caused by the lazy intialization of the control's Items - it happens as the drop down is first opened which causes the delay.

You could workaround the issue, by forcing the Items to initialize after the page loads. For instance, put the following function on your page:

function pageLoad() 
    var comboBox = $find("<%= RadComboBoxServerID.ClientID %>"); 
    comboBox.get_items(); // force Item initialization 

Please try using this approach and share the results.

Sincerely yours,
Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Lucas County Information Services
Top achievements
Rank 1
Answers by
Lucas County Information Services
Top achievements
Rank 1
Simon
Telerik team
Share this question
or