Could someone shed some light on this. I really like the ease of use of the Ajax Control Toolkit "ComboBox" but when I bind it to large amounts of data it acts funny. For example: I have a linq query that returns our customer list. (I have a linq to sql query that returns an anonymous type) The linq to Sql Query returns 3,589 records. The problem I'm having is some of the words I type are found and highlighted in the dropdown and some are not. When I set the AutoCompleteMode to "Suggest" it totally misses some of the customer names in the list (Some it finds). When I set AutoCompleteMode to "SuggestAppend" the combobox finds and fills in the full name in the box but again stalls in finding and highlighting the word in the list. Anyone have any ideas with what I'm doing wrong.
Dave.
Linq query
public class CustList
{
public string CustName { get; set; }
public string custID { get; set; }
}
public IEnumerable<CustList> GetCustomers()
{
var result = from c in Context.Customers
where c.Cono == 1 && c.StatusType == "Y"
orderby c.CustName.Trim()
select new CustList { CustName = c.CustName, custID = c.CustId };
return result;
}
Combobox source
I have the combo box set up as follows.
<asp:ComboBox ID="cboCustomers" runat="server"
DropDownStyle="DropDown"
AutoCompleteMode="SuggestAppend"
AutoPostBack="false" width="300px"
CaseSensitive="false"
RenderMode="Inline"
ItemInsertLocation="Append">
</asp:ComboBox>
Code to bind combobox
DataService cust = new DataService();
cboCustomers.DataSource = cust.GetCustomers();
cboCustomers.DataTextField = "CustName";
cboCustomers.DataValueField = "custID";
cboCustomers.DataBind();