Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 application.....now 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.
XML
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;
               }


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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900