Adding many items to RadListBox

2 posts, 0 answers
  1. Dave Hollen
    Dave Hollen avatar
    46 posts
    Member since:
    Jan 2010

    Posted 11 Mar 2010 Link to this post


    I am trying to use a RadListBox to display items that a user has selected on a RadGrid.

    There is an instance where, on a button click, I am attempting to add 2000+ items to the radlistbox.  This is all being done in JavaScript.

    When adding this many items, the browers (IE 8) displays a message stating that there is script being run on the page that is causing the page to not respond.  I believe this is being caused by having to add so many items to the RadListBox.

    Is there a workaround for this, or another control that i can use to display selected items from the grid?  I need to keep this on client side in Javascript.

    Here is the script that I am using to add items to the RadListBox (my radlistbox is named rlbSelectedContacts):

                                var rlbSelectedContacts = $find("<%=rlbSelectedContacts.ClientID %>");
                                if (rlbSelectedContacts)
                                        for (each item in my list of items to add) //this FOR loop could iterate thousands of times
                                            var item = new Telerik.Web.UI.RadListBoxItem();
                                            if (item)

  2. Yana
    Yana avatar
    4547 posts

    Posted 12 Mar 2010 Link to this post

    Hello Dave Hollen,

    It's expected behavior, because IE doesn't handle dom elements so good and you're adding too many items.
    I recommend using RadComboBox instead and load the items on demand as it's demonstrated here.

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top