if (this.grd_stock.CurrentCell.ColumnIndex == this.grd_stock.Columns["I_Name"].Index) //Item_name { string[] postSource = autofind.AsEnumerable().Select<System.Data.DataRow, String>(x => x.Field<String>("Item_name")).ToArray(); TextBox te = e.Control as TextBox; te.AutoCompleteMode = AutoCompleteMode.SuggestAppend; //te.AutoCompleteCustomSource.AddRange(new string[] { "one", "two", "three" }); te.AutoCompleteCustomSource.AddRange(postSource); te.AutoCompleteSource = AutoCompleteSource.CustomSource; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)