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

EnableVirtualScrolling strange behaviour

8 Answers 306 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Foenix
Top achievements
Rank 1
Foenix asked on 22 Apr 2010, 10:38 PM
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?

8 Answers, 1 is accepted

Sort by
0
Accepted
Simon
Telerik team
answered on 23 Apr 2010, 09:57 AM
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.
0
Foenix
Top achievements
Rank 1
answered on 23 Apr 2010, 02:39 PM
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.
0
Quinten
Top achievements
Rank 1
answered on 22 Jun 2010, 05:07 PM
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> 
0
Simon
Telerik team
answered on 24 Jun 2010, 01:11 PM
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
0
Vasssek
Top achievements
Rank 1
answered on 25 May 2017, 01:09 PM

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

0
Vessy
Telerik team
answered on 30 May 2017, 08:22 AM
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.
0
Vasssek
Top achievements
Rank 1
answered on 30 May 2017, 08:42 AM

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

0
Vessy
Telerik team
answered on 02 Jun 2017, 08:22 AM
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.
Tags
ComboBox
Asked by
Foenix
Top achievements
Rank 1
Answers by
Simon
Telerik team
Foenix
Top achievements
Rank 1
Quinten
Top achievements
Rank 1
Vasssek
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or