RadComboBox of OnItemsRequested text=""
When the mouse moves to the selection box, the error will pop up due to the empty value. will pop up error :The array can't be empty. Parameter name: bytes
The 2016.2.607.40 version is OK, and the later version has this error
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProFlowDirectionEdit.aspx.cs" Inherits="Healthway.XA.Web.UI.Pages.FlowDirection.ProFlowDirectionEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<div>
<telerik:RadComboBox ID="RadComboBoxProduct" runat="server" Height="200" Width="315"
DropDownWidth="315" Text="" HighlightTemplatedItems="true"
EnableLoadOnDemand="true" Filter="StartsWith" OnItemsRequested="rcbCustomer_ItemsRequested"
Skin="Office2010Silver">
<HeaderTemplate>
<table style="width: 275px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 175px;">
Product Name
</td>
<td style="width: 60px;">
Quantity
</td>
<td style="width: 40px;">
Price
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 275px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 175px;">
<%# DataBinder.Eval(Container, "Text")%>
</td>
<td style="width: 60px;">
<%# DataBinder.Eval(Container, "Attributes['CusCode']")%>
</td>
<td style="width: 40px;">
<%# DataBinder.Eval(Container, "Attributes['CusName']")%>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
</div>
</form>
</body>
</html>
protected void rcbCustomer_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
string sqlSelectCommand = "SELECT [CusCode], [CusName] from [Customer] WHERE [CusName] LIKE @text + '%' ORDER BY [CusName]";
SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand,
ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);
adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text);
DataTable dataTable = new DataTable();
adapter.Fill(dataTable);
foreach (DataRow dataRow in dataTable.Rows)
{
RadComboBoxItem item = new RadComboBoxItem();
item.Text = (string)dataRow["CusName"];
item.Value = dataRow["CusCode"].ToString();
//RadComboBoxProduct.Items.Add(item);
item.DataBind();
}
}