Unplanned
Last Updated: 14 Dec 2020 15:47 by ADMIN
Abdurrahman
Created on: 03 Dec 2020 07:51
Category: ComboBox
Type: Bug Report
0
Place ComboBox loading box on bottom when using load on demand feature

Hi Telerik Support,

 

How do I move loading box to bottom of the combo box list when using load on demand feature. the case is we're using ShowMoreResultsBox=true and EnableVirtualScrolling=true and trying to get next batch of data on a heavy query, the loading box not showing on the list see image (2020-12-03 14_31_40-Agent - Verint Express.png).

can we show the loading box on the bottom of the dropdownlist, so user is aware that the data still being loaded.

Thank you

 

 

5 comments
ADMIN
Eric R | Senior Technical Support Engineer
Posted on: 14 Dec 2020 15:47

Hi Abdurrahman,

That is correct, IE11 doesn't support the CSS Sticky feature. This leaves a couple of options available. Let me go over them below. 

IE11 Options

The first and recommended option is to use an alternative browser. This is the easiest approach.

The second is to implement the sticky using an older approach for IE. This is described in the position: sticky not working in IE Stack Overflow thread.

Wrapping Up

Ultimately, I recommend moving to a newer browser. Understandably, this may not be possible for all scenarios.

Please let me know if you need any additional information. Thank you.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Abdurrahman
Posted on: 10 Dec 2020 07:15

Hi Eric..

The work around works great on the browser except IE11 since IE11 doesn't support css position:sticky. see (https://caniuse.com/css-sticky).

Do you have any alternative to make it works on IE11 ?
Thank you

ADMIN
Eric R | Senior Technical Support Engineer
Posted on: 04 Dec 2020 17:12

Hi Abdurrahman,

Thank you for providing the additional information. This helped me understand the issue more. I discussed this with the team, and we believe this should be labelled as a bug report. Additionally, we do have a workaround which I will go over below. 

Workaround

At the present time, the Loading... text will remain at the top of the list when it is requesting items. Using some CSS and JavaScript we can place it near the bottom while requesting items. Let me review each of these next. 

CSS

The following styles will place the loading item at the bottom. Note the height property.

html body .RadComboBoxDropDown .rcbLoading {
    position: sticky;
    height: 30px;
}

JavaScript

With the above styles, we can use a little jQuery magic to dynamically place the Loading.. at the bottom. Note the (this.getBoundingClientRect().height - 30) calculation. The reason this is important is in case the hieght of the dropdown changes. 

function OnClientLoad(sender, args) {
    $(document).on('DOMNodeInserted', '.RadComboBoxDropDown .rcbScroll', function (e) {
        if ($(e.target).hasClass('rcbLoading')) {
            // adjust the height based on it's parent height
            $(this).find('.rcbLoading').css("top", (this.getBoundingClientRect().height - 30) + "px");
        }
    });
}

ComboBox Markup

The following is the markup from the demo that was mentioned.

<div>
    <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" Width="400" Height="150"
        EmptyMessage="Select a Company" DataSourceID="SqlDataSource1" DataTextField="CompanyName"
        DataValueField="CompanyName" EnableAutomaticLoadOnDemand="True" ItemsPerRequest="10"
        ShowMoreResultsBox="true" EnableVirtualScrolling="true" Label="Server-Side (Automatic):"
        OnItemsRequested="RadComboBox1_ItemsRequested" OnClientLoad="OnClientLoad">
    </telerik:RadComboBox>
    <telerik:RadButton RenderMode="Lightweight" runat="server" Text="Select" ID="Button1" OnClick="Button1_Click" />
    <br />
    <asp:Label CssClass="status-text" ID="Label1" runat="server" />
</div>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT [CompanyName] from [Customers] ORDER By [CompanyName]">
</asp:SqlDataSource>

Wrapping Up

For additional reference, I have attached a working sample to illustrate the workaround. To run the sample locally, ensure the Northwind database is installed in the (localdb)\MSSQLLocalDB instance and the Telerik NuGet Feed is Configured in Visaul Studio. If the restore fails use the update-package -reinstall from the Package Manager Console in Visual Studio.

Additionally, we used a simpler approach to achieve the above workaround and you may consider using the recommended approach from StackOverflow

Finally, we appreciate any feedback that you may have and I awarded your account 1000 Telerik Points because this change would make using the Load on Demand much more intuitive. 

Please let me know if you have any issues with the sample or if you need any additional information. Thank you for being a valued UI for ASP.NET AJAX developer.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh fresh look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Attached Files:
Abdurrahman
Posted on: 03 Dec 2020 23:09

Hi Eric, 

 

Thank you for your reply, I'll prepare and provide you the detail. mean while, What I mean is the loading box position is not appear when getting the next batch of data.

For example let use server-side(automatically) load on demand, that you gave me. When we search or get the first 1-10 data, there is loading box (loading...), but for the next batch (11-20 and soon) by scrolling or click arrow down, the is no loading box appears. 

the case is if the request to server take took a long time and since the loading box not appear (for 11-20 and soon), the user didn't know that the data is still being loaded from the server or not. That what I mean on the 2020-12-03-14-31-40-agent-verint-express.png. It already display 7 out of 11 data, and when we scroll down, it will get the 7-11 data, but the loading box (loading...) not appear and user didn't know.

One of the solution that we want to do is to display the loading box at the bottom of the box (see loading bottom position.png)

I hope you understand what I mean.

Thank you

Attached Files:
ADMIN
Eric R | Senior Technical Support Engineer
Posted on: 03 Dec 2020 20:52

Hi Abdurrahman,

Thank you for the screenshots. However, I am not sure that I understand the requirement. From what I can see, the Loading.. text is not appearing when items are present because the requested items has completed loading which is expected behavior. Let me explain more below. 

Load on Demand Explanation

The Load on Deman Modes demo displays the separate ways for doing Load on Demand. The feature works so that when it is requesting items, the Loading.. text is only visible until data has loaded. 

The 2020-12-03-14-31-40-agent-verint-express.png image illustrates this because the displayed values are the only values available to load.

Wrapping Up

To fully troubleshoot this, I will need to know more about the desired behavior  and the current implementation. Is it possible that you can provide the following itmes?

  1. The ComboBox markup, code-behind and any client-side events.
  2. A video displaying the current behavior

In the meantime, please let me know if you need any additional information. Thank you and I look forward to your reply.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.