In Development
Last Updated: 03 Jun 2026 13:58 by ADMIN
Nitin
Created on: 03 Jun 2026 13:56
Category: ComboBox
Type: Bug Report
0
RadComboBox infinite “Loading…” issue after upgrading to 2026.1.225.462

After upgrade an infinite "Loading..." is displayed when using load on demand:

<telerik:RadComboBox
    ID="ddlOldValues"
    runat="server"
    Filter="Contains"
    AllowCustomText="true"
    ShowMoreResultsBox="true"
    EnableLoadOnDemand="true"
    ItemsPerRequest="10"
    EnableVirtualScrolling="true"
    DataTextField="USERFULLNAME"
    DataValueField="USERFULLNAME">
    <WebServiceSettings Method="GetDynamicUsersUS" Path="WebService.asmx" />
</telerik:RadComboBox>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService
{
    [WebMethod(EnableSession = true)]
    public RadComboBoxData GetDynamicUsersUS(RadComboBoxContext context)
    {
        RadComboBoxData comboData = new RadComboBoxData();

        try
        {
            DataTable data = GetUsersData();
            string filter = "USERFULLNAME LIKE '%" + context.Text + "%'";
            data.DefaultView.RowFilter = filter;
            DataTable dtData = data.DefaultView.ToTable();

            if (dtData == null || dtData.Rows.Count == 0)
            {
                dtData = data;
            }

            // Exact same GetComboData logic as frmBRMultipleUpdate.aspx.vb
            int itemsPerRequest = 10;
            int itemOffset = context.NumberOfItems;
            int endOffset = itemOffset + itemsPerRequest;

            if (endOffset > dtData.Rows.Count)
            {
                endOffset = dtData.Rows.Count;
            }

            // When data is exhausted, set EndOfItems to true
            if (itemOffset >= dtData.Rows.Count)
            {
                comboData.EndOfItems = true;
                comboData.Items = new RadComboBoxItemData[0];
                return comboData;
            }

            comboData.EndOfItems = (endOffset >= dtData.Rows.Count);

            var result = new List<RadComboBoxItemData>();
            for (int i = itemOffset; i < endOffset; i++)
            {
                var item = new RadComboBoxItemData();
                item.Text = dtData.Rows[i]["USERFULLNAME"].ToString();
                item.Value = dtData.Rows[i]["USERFULLNAME"].ToString();
                result.Add(item);
            }

            comboData.Items = result.ToArray();
            comboData.Message = string.Format("Items <b>{0}</b>-<b>{1}</b> out of <b>{2}</b>",
                itemOffset + 1, endOffset, dtData.Rows.Count);
        }
        catch (Exception ex)
        {
            comboData.Message = "No matches";
        }
        return comboData;
    }

    private static DataTable GetUsersData()
    {
        DataTable dt = new DataTable();

        dt.Columns.Add(new DataColumn("USERFULLNAME", typeof(string)));
        dt.Columns.Add(new DataColumn("EMAIL", typeof(string)));

        for (int i = 0; i < 200; i++)
        {
            int index = i + 1;

            DataRow row = dt.NewRow();

            row["USERFULLNAME"] = "User" + index;
            row["EMAIL"] = "user" + index + "@example.com";

            dt.Rows.Add(row);
        }

        return dt;
    }
}

To work-around it, set a Height to the ComboBox:

<telerik:RadComboBox
    Height="300px"
    ID="ddlOldValues"
    ...

 

 

0 comments