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
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);
}
}