Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > Automatic Load on Demand Error
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Automatic Load on Demand Error

Feed from this thread
  • Ryan avatar

    Posted on May 19, 2011 (permalink)

    Hello,
    I am at a loss and cannot figure out how to solve this error and would appreciate any help Telerik or the community can come up with.

    I am working with a RadComboBox and AutomaticLoadOnDemand with Templated Items.  When the page loads the ComboBox is empty. When I click on the drop down arrow i get an error message that says "Parameter "propertyName" is not valid. String arguments cannot be empty. Parameter name: propertyName"  Now, when I remove EnableAutomaticLoadOnDemand it load the records fine and everything works as expected.  

    I am using Telerik Version 2011.1.519.0 on .Net Framework 4.0. I am running this web app in Internet Explorer 8 on my development machine. Windows 7 64.

    Below is the code I have, any suggestions are welcome.

    ASP.NET Page

    <telerik:RadComboBox ID="rcbClient" runat="server" Label="Client: " Width="276px"
    AutoPostBack="true" OnSelectedIndexChanged="rcbClient_SelectedIndexChanged"
    DataSourceID="edsClient" OnDataBound="rcbClient_DataBound"
    OnItemDataBound="rcbClient_ItemDataBound" DropDownWidth="710px" MarkFirstMatch="true"
    HighlightTemplatedItems="true" EnableAutomaticLoadOnDemand="true" ItemsPerRequest="10"
    ShowMoreResultsBox="true" EnableVirtualScrolling="true" Filter="Contains">
    <HeaderTemplate>
         <ul>
              <li class="colName">Name</li>
              <li class="colOrg">Organization</li>
              <li class="colEmail">Work Email</li>
              <li class="colPhone">Work Phone</li>
         </ul>
    </HeaderTemplate>
    <ItemTemplate>
         <ul>
               <li class="colName"><%# DataBinder.Eval(Container.DataItem, "Surname") %>,
     <%# DataBinder.Eval(Container.DataItem, "FirstName") %></
    li>
               <li class="colOrg"><%# DataBinder.Eval(Container.DataItem, "Organization.Name")%></li>
               <li class="colEmail"><%# DataBinder.Eval(Container.DataItem, "WorkEmail") %></li>
               <li class="colPhone"><%# DataBinder.Eval(Container.DataItem, "WorkPhoneNumber") %>
            <%# !string.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "WorkExtension").ToString())
    ? " ext. " + DataBinder.Eval(Container.DataItem, "WorkExtension") : ""%></
    li>
         </ul>
    </ItemTemplate>
    <FooterTemplate>
         A total of <asp:Literal runat="server" ID="rcClientItemsCount" /> items
    </FooterTemplate>
    </telerik:RadComboBox>

    <telerik:RadToolTip ID="rttClient" runat="server" Width="275px" Height="20px" RelativeTo="Element"
      Position="TopRight" HideEvent="LeaveTargetAndToolTip" TargetControlID="rcbClient">
    </telerik:RadToolTip>

    <asp:EntityDataSource ID="edsClient" runat="server" ConnectionString="name=RBISEntities"
            DefaultContainerName="RBISEntities" EnableFlattening="False" EntitySetName="Clients"
            Include="Organization" OrderBy="it.Surname, it.FirstName" AutoPage="true">
    </asp:EntityDataSource>

    C# Code Behind
    protected void rcbClient_SelectedIndexChanged(object sender, EventArgs e)
    {
            try
            {
                LoadClientToolTip();
            }
            catch (Exception exc)
            {
                this.Master.ShowMessageBox(exc.Message, MessageBox.enmMessageType.Error);
            }
    }
     
        protected void rcbClient_DataBound(object sender, EventArgs e)
        {
            ((Literal)rcbClient.Footer.FindControl("rcClientItemsCount")).Text =
                      Convert.ToString(rcbClient.Items.Count);
            LoadClientToolTip();
        }
     
        protected void rcbClient_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
        {
            RBISModel.Client client = ((RBISModel.Client)e.Item.DataItem);
            e.Item.Text = client.Surname.ToString() + ", " + client.FirstName.ToString();
            e.Item.Value = client.Id.ToString();
        }
     
     private void LoadClientToolTip()
        {
            if (rcbClient.SelectedIndex > -1)
            {
                int ClientId = Convert.ToInt32(rcbClient.SelectedValue);
                RBISModel.Client client = this.Master.DbEntity.Clients.Single(c => c.Id == ClientId);
     
                string toolTip = string.Empty;
     
                toolTip += string.Format("<span class=\"field\">Name:</span> {0}<br/>",
        client.Surname +
    ", " + client.FirstName);
                toolTip += string.Format("<span class=\"field\">Client Type:</span> {0}<br/>",
    client.ClientType.Name);
                toolTip += string.Format("<span class=\"field\">Organization:</span> {0}<br/>",
    client.Organization.Name);
                toolTip += string.Format("<span class=\"field\">Work Email:</span> {0}<br/>",
    !
    string.IsNullOrEmpty(client.WorkEmail) ?
    string.Format("<a href=\"mailto:{0}\">{0}</a>", client.WorkEmail) : "");
                toolTip += string.Format("<span class=\"field\">Work Phone:</span> {0}",
    client.WorkPhoneNumber +
    Convert.ToString(!
    string.IsNullOrEmpty(client.WorkExtension) ?
    string.Format(" ext: {0}", client.WorkExtension) : ""));
     
                rttClient.Text = string.Format("<div style=\"text-align: left;\">{0}</div>", toolTip);
            }
        }

  • Kate Kate admin's avatar

    Posted on May 25, 2011 (permalink)

    Hi Ryan,

    Can you please open a support ticket and send us a running project with the reproduced issue, so we could help you out?

    Regards,
    Kate
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > Automatic Load on Demand Error