Click here to Skip to main content
14,421,568 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi every one,

here i am new to wpf coding, now i am using a wpf application., here i want to implement a autocomplete option in datagridview control, i am already using this coding in my window i want to use in wpf application...and one more thing i am using Datagridview windowHost instead of Datagrid.....

here i am showing a Itemname from aDatabase.
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.AutoCompleteSource = AutoCompleteSource.CustomSource;

now i am similar to datagridview autocomplete in Datagridview in WPF Application....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100