EnableVirtualScrolling strange behaviour

9 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. 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.
  4. 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> 
  5. 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
  6. Vasssek
    Vasssek avatar
    158 posts
    Member since:
    Aug 2010

    Posted 25 May in reply to Simon Link to this post

    Hello,

    the issue with virtual scrolling seems has not been solved in 2017.2.503, yet.

    I have a combobox inside grid, here is the declaration:

    <telerik:RadComboBox LoadingMessage="Čakajte prosím..." CssClass="cmb_Comments_AssignedPerson" DropDownCssClass="cmb_Comments_AssignedPerson_DropDown"
    EmptyMessage="Zadajte priezvisko - min. 3 znaky" OnClientDropDownOpening="OnClientDropDownOpening_cmb_Comments_AssignedPerson"
    MarkFirstMatch="true" OnItemsRequested="cmb_Comments_AssignedPerson_ItemsRequested"
    EnableLoadOnDemand="True" RenderMode="Auto" OnClientItemsRequesting="OnClientItemsRequesting_cmb_Comments_AssignedPerson"
    ID="cmb_Comments_AssignedPerson" runat="server" HighlightTemplatedItems="true"
    ValidationGroup="Comments_AssignedPerson" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
    OnClientDropDownClosed="OnClientDropDownClosed_cmb_control">
    <HeaderTemplate>
    <div style="width: 270px; white-space: nowrap">
    Priezvisko meno, skratka oddelenia
    </div>
    </HeaderTemplate>
    <ItemTemplate>
    <div style="width: 270px; white-space: nowrap">
    <%# DataBinder.Eval( Container, "Text" )%>
    </div>
    </ItemTemplate>
    </telerik:RadComboBox>

    If I don't set height parameter then no additional record are shown (method cmb_Comments_AssignedPerson_ItemsRequested is not fired). Only when I click on rcbMoreResults. But when I set height, e.g 200px, then when user scrolls down, new records are appearing as requested (request method is fired automatically)...

    Please help us to solve this issue.

    Best regards

    Vasssek

  7. Vessy
    Admin
    Vessy avatar
    1641 posts

    Posted 30 May Link to this post

    Hi Vasssek,

    The current implementation of the RadCombobox's VirtualScrolling feature depends on the Height or MaxHeight properties, which is why this functionality will not behave correctly as the MaxHeight or Height properties must be set. The combobox internally searches for those properties values, in order to calculate at which point it should request the other portion of items.

    To be more detailed, with the current implementation, the dropdown height is correctly applied via the css style rule, but the property has no value - empty string. Thus, when the internal logic for items request is executed and the maxHeight value is empty - a request for the next portion of items is never triggered (for the VirtualScrolling scenario).

    The item discussed in this thread was a possible improvement for this functionality, but it has not been ever impemented due to the low demand for such a change. As this feature request was logged in our old portal and it is no available any more, you can feel free to log new item for it in our actual Feedback portal and we will reconsider such implementation should it have become more needed by the developers:
    https://feedback.telerik.com/Project/108/Feedback/List/Feature%20Request

    Regards,
    Vessy
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Vasssek
    Vasssek avatar
    158 posts
    Member since:
    Aug 2010

    Posted 30 May in reply to Vessy Link to this post

    Hello,

    OK, I will register this request into the PITS. I want to assign radcombox height thróugh CSS class and not declare it straight in radcombox, because of response design of our web page and this control as well.

    But for now, could you please give us some workaround ?  Some javascript (jquery) which will read (height) property from CSS style class and apply it to radcombobox on combo first load, so the combox can request next portion of data on virtual scroll ?

    Thank you

    Vasssek

  9. Vessy
    Admin
    Vessy avatar
    1641 posts

    Posted 02 Jun Link to this post

    Hi Vasssek,

    I am afraid that RadCombobox does not provide a client-side API for setting its height and their is no suitable workaround I can suggest you until the discussed feature is implemented.

    Regards,
    Vessy
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top