Have a basic WebCombo with simple data. I'm trying to filter the data as the user types.It works only if what the user is typing is what the column value starts with (e.g. if user types T-e-d, the row with 'Ted Redfern' is displayed)If the user types R-e-d, the row with 'Ted Redfern' flashes, then disappears, leaving an empty grid.The strange thing is, if the user types R-e-d, then clicks the left or right arrow, the correct row is displayed.
Thanks.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebComboTest.aspx.cs" Inherits="WebComboTest" %><%@ Register Assembly="Infragistics35.WebUI.WebCombo.v10.3, Version=10.3.20103.2013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.WebCombo" TagPrefix="igcmbo" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <script type="text/javascript"> function WCEditKeyUp(wcid) { var wc = igcmbo_getComboById(wcid); var input = wc.inputBox.value.toString(); wc.selectWhere("ResourceName LIKE '%" + input + "%'"); } </script></head><body> <form id="form1" runat="server"> <igcmbo:WebCombo ID="WebCombo1" runat="server" OnInitializeDataSource="WebCombo1_InitializeDataSource"> <ClientSideEvents EditKeyUp="WCEditKeyUp" /> </igcmbo:WebCombo> </form></body></html>
using System;using System.Data;using Infragistics.WebUI.WebCombo;public partial class WebComboTest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { WebCombo1.DataTextField = "ResourceName"; WebCombo1.DataValueField = "ID"; WebCombo1.EnableXmlHTTP = true; WebCombo1.Editable = true; WebCombo1.ComboTypeAhead = TypeAhead.Suggest; WebCombo1.ExpandEffects = new ExpandEffects() { Duration = 200, Type = ExpandEffectType.RandomDissolve }; } protected DataTable LoadData() { DataTable resourcesTable = new DataTable("Resources"); resourcesTable.Columns.Add("ID", typeof(int)); resourcesTable.Columns.Add("ResourceName", typeof(string)); resourcesTable.Columns.Add("ResourceDescription", typeof(string)); resourcesTable.Columns.Add("EmailAddress", typeof(string)); resourcesTable.Rows.Add(new object[] { 2, "Unassigned", "Unassigned Resource", "unassigned@resources.com" }); resourcesTable.Rows.Add(new object[] { 5, "Allyson Tuley", "Allyson Tuley", "aTuley@resources.com" }); resourcesTable.Rows.Add(new object[] { 15, "Ted Redfern", "Ted Redfern", "tRedfern@resources.com" }); resourcesTable.Rows.Add(new object[] { 25, "Jamie Gadomski", "Jamie Gadomski", "jGadomski@resources.com" }); return resourcesTable; } protected void WebCombo1_InitializeDataSource(object sender, Infragistics.WebUI.WebCombo.WebComboEventArgs e){ DataTable dt = LoadData(); DataView dv = dt.DefaultView; WebCombo1.DataSource = dv; WebCombo1.DataBind(); }}
Hello haluk,
try to use WebCombo1.ComboTypeAhead = TypeAhead.Simple;
https://www.infragistics.com/help/aspnet/webdropdown-autocomplete-and-auto-filtering
I hope this is going to help you
Thanks...that did it