EnableVirtualScrolling strange behaviour

5 posts, 1 answers
  1. Foenix
    Foenix avatar
    20 posts
    Member since:
    Jul 2008

    Posted 22 Apr 2010 Link to this post

    Hi,

    I've found that Virtual Scrolling of a RadComboBox with EnableLoadOnDemand set to true doesn't work properly.
    First situation: I have a RadGrid with a GridDropDownColumn. In the ItemDataBound event handler I look for the ComboBox and convert it to ComboBox with LoadOnDemand enabled:
    cmbUsers.EnableLoadOnDemand = true
    cmbUsers.ShowMoreResultsBox = true
    cmbUsers.AppendDataBoundItems = true
    cmbUsers.MarkFirstMatch = true
    cmbUsers.ItemRequestTimeout = 1000; 
    cmbUsers.EnableVirtualScrolling = true
    cmbUsers.WebServiceSettings.Method = "GetComboUsers"
    cmbUsers.WebServiceSettings.Path = "Edit1.aspx"
    In this case VirtualScrolling works perfectly.

    Second situation: I have a form with a RadComboBox on it:
    <telerik:RadComboBox runat="server" ID="ddlAttendant" Width="120px" Skin="Default" TabIndex="2" EnableLoadOnDemand="true" 
              AppendDataBoundItems="True" DropDownWidth="130px" ShowMoreResultsBox="True" EnableVirtualScrolling="true" 
              EmptyMessage="Select the attendant" MarkFirstMatch="True" AllowCustomText="True" ShowDropDownOnTextboxClick="False"
          <CollapseAnimation Duration="200" Type="OutQuint" /> 
           <WebServiceSettings Method="GetComboUsers" Path="Edit1.aspx" />                                           
        </telerik:RadComboBox> 

    So, I use same method to retrieve the data for my ComboBox, but in this case VirtualScrolling doesn't work at all.

    I've tried different approaches (like assign properties' values in Page_Init or even create RadComboBox during Init) without any success.
    Could you tell me why does it happen and how can I resolve this problem?
  2. Answer
    Simon
    Admin
    Simon avatar
    2281 posts

    Posted 23 Apr 2010 Link to this post

    Hello Foenix,

    This is strange as both configurations are equivalent.

    Can you please try setting the Height property and verify whether it fixes the issue?

    Regards,
    Simon
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Foenix
    Foenix avatar
    20 posts
    Member since:
    Jul 2008

    Posted 23 Apr 2010 Link to this post

    Hello Simon,

    Thank you for your response. Yes, setting Height or MaxHeight property to some value fixes the problem (even if the value is bigger than default value). Nevertheless, I don't think that VirtualScrolling should depend on whether those properties were set or not.

    Anyway, thank you for your help.
  5. Chris May IT Team Lead
    Chris May IT Team Lead avatar
    31 posts
    Member since:
    Nov 2009

    Posted 22 Jun 2010 Link to this post

    I experienced the same behavior with the RadComboBox: EnableVirtualScrolling does not work unless Height or MaxHeight is specified.  This seems like a bug to me--the height should be determined by the number of items initially displayed, not a preset pixel measurement.

            <telerik:RadComboBox ID="RadComboBoxPhaseCodes" runat="server" EmptyMessage="Enter Phase Code" LoadingMessage="Loading..."    
                EnableLoadOnDemand="true" EnableItemCaching="true" Height="210px" Width="150px" DropDownWidth="420px" 
                Font-Size="12px" ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true" MarkFirstMatch="true" AppendDataBoundItems="true">  
                <HeaderTemplate> 
                    <table style="width: 400px" cellspacing="0" cellpadding="0">  
                        <tr> 
                            <td style="width: 80px;">  
                                Phase  
                            </td> 
                            <td style="width: 300px;">  
                                Description  
                            </td> 
                        </tr> 
                    </table> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <table style="width: 400px" cellspacing="0" cellpadding="0">  
                        <tr> 
                            <td style="width: 80px; font-size:12px;">  
                                <%# DataBinder.Eval(Container, "Text")%> 
                            </td> 
                            <td style="width: 300px; font-size:12px;">  
                                <%# DataBinder.Eval(Container, "Attributes['Description']")%> 
                            </td> 
                        </tr> 
                    </table> 
                </ItemTemplate> 
            </telerik:RadComboBox> 
  6. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 24 Jun 2010 Link to this post

    Hi Patrick Wirtz,

    So you are saying that if neither Height nor MaxHeight are specified and Virtual Scrolling is enabled the drop down height should become that after the first batch of Items are loaded. This is a possible solution and I will log it as a feature request. You can track its status here.

    All the best,
    Simon
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017