"Same" combo box repeated a lot of times

4 posts, 0 answers
  1. dstj
    dstj avatar
    82 posts
    Member since:
    Oct 2006

    Posted 04 Jun 2009 Link to this post


    Here is my situation: on a page used to match items from list A with items from list B, I repeat the "same" RadComboBox presenting the items from list B (via a load on demand webservice) for each item of list A.

    1 <asp:Repeater ID="rptr" runat="server" OnItemDataBound="rptr_ItemDataBound"
    2    <HeaderTemplate> 
    3       <table cellpadding="0" cellspacing="0" class="hspace"
    4          <tr> 
    5             <th><asp:Literal ID="lblItemA" runat="server" Text="Item A" /></th
    6             <th><asp:Literal ID="lblItemB" runat="server" Text="Item B" /></th
    7          </tr> 
    8    </HeaderTemplate> 
    9    <ItemTemplate> 
    10       <tr> 
    11          <td><asp:Literal ID="ltrlItemA" runat="server" /><asp:HiddenField ID="hfIdItemA" runat="server" /></td
    12          <td> 
    13             <telerik:RadComboBox ID="rcmb" runat="server" Skin="Default" Width="300px" ShowMoreResultsBox="true" EnableVirtualScrolling="false"  
    14                EnableLoadOnDemand="true" MarkFirstMatch="true" ItemRequestTimeout="500" OpenDropDownOnLoad="false" ShowDropDownOnTextboxClick="false"
    15                <WebServiceSettings Path="services/RadControlsHelper.asmx" Method="SearchItemB" /> 
    16             </telerik:RadComboBox> 
    17          </td> 
    18       </tr> 
    19    </ItemTemplate> 
    20    <FooterTemplate></table></FooterTemplate> 
    21 </asp:Repeater> 

    The scenario is that for each item of list A we assign an item from list B.

    With numerous items in the lists (let's say 1000), the page is horribly slow on IE8. Horribly slow in the sense that it never actually loads, IE8 crashes. Firefox seems to handle it much better.

    Can you provide any insight on how I could fix my problem ? My thoughts were :
    1) Use a paging control to display less items at once (but no less than 100).
        This is merely a workaround, not a real fix though...

    2) Some Telerik functionality to share the same combo client-object since it's always the same items being loaded. (similar to SharedCalendarID in RadDatePicker)

    3) Create one single invisible RadComboBox outside the Repeater and manually manipulate it though javascript to reuse it and save the result in an hidden field for each item.
        Effectivelly doing a manual 2)

    What are your thoughts? Thanks.

    Using 2009 Q1 SP1 (v2009.1.527.35)

  2. dstj
    dstj avatar
    82 posts
    Member since:
    Oct 2006

    Posted 04 Jun 2009 Link to this post

    I tried using a RadGrid to page the list. Anything over a page size of 30 items is more or less unusable in IE8 because the client-side initialization process is taking a long long time.
  3. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 05 Jun 2009 Link to this post

    Hi dstj,

    Displaying 100 comboboxes in the same page would impose a performance hit for sure. Having that many rich UI controls of any type would create an overhead. RadComboBox does not have a ShareDropDown or something similar property but even if it had it would help as in load on demand scenarios a dropdown is never created until the combobox is populated. I guess the only workaround is to have a single combobox and move it in the HTML when needed (option 3).

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. dstj
    dstj avatar
    82 posts
    Member since:
    Oct 2006

    Posted 05 Jun 2009 Link to this post

    Thanks for the reply. That's what I ended up doing.

    I'm now struggling to make the TAB button work properly. Since I play with an absolute positioned RadComboBox outside of the control flow, the TAB order is completely messed up when existing the Combo Box via TAB... but I guess that's another story.
Back to Top