Home All Groups Group Topic Archive Search About

C# : textBox control

Author
15 Mar 2007 4:13 PM
mehdi
this my code :
string p = "REPUBLIQUE"
................
String SQl = @"select FEANME from st_cd_b where FEANME like'%" + p + "%'";
................
foreach (DataRow dr in table.Rows)
                   {
                       object[] tab = dr.ItemArray;
                       string s = Convert.ToString(tab[0]);
                   textBox1.AutoCompleteCustomSource.Add(s);

                     }
               }

if taping first charactere EXEMPLE "R" in textbox interface, I have all list
of words that start with this charactere : REPUBLIQUE FRANCE , REPUBLIQUE
GERMANY
but I have not the rest of  word that start with first character to locate
in any place EXEMPLE I HAVE NOT : MAROC REPUBLIQUE
WHEREAS MAROC REPUBLIQUE existe in my collection
please help my

Author
18 Mar 2007 10:40 AM
<ct>
That is basically how it is supposed to work, much like the autocomplete
functionality of Internet Explorer in the address bar. The functionality
you're looking for must be custom coded, or perhaps a third-party control
will help you?

--
Carsten Thomsen
Senior .NET Solutions Architect / Developer / Author
MCAD/MCSD/MCSE/MCTS
Show quote
"mehdi" <me***@discussions.microsoft.com> wrote in message
news:8C9A8AB1-7EB5-476F-822C-21A85329DE31@microsoft.com...
> this my code :
> string p = "REPUBLIQUE"
> ...............
> String SQl = @"select FEANME from st_cd_b where FEANME like'%" + p + "%'";
> ...............
> foreach (DataRow dr in table.Rows)
>                   {
>                       object[] tab = dr.ItemArray;
>                       string s = Convert.ToString(tab[0]);
>                   textBox1.AutoCompleteCustomSource.Add(s);
>
>                     }
>               }
>
> if taping first charactere EXEMPLE "R" in textbox interface, I have all
> list
> of words that start with this charactere : REPUBLIQUE FRANCE , REPUBLIQUE
> GERMANY
> but I have not the rest of  word that start with first character to locate
> in any place EXEMPLE I HAVE NOT : MAROC REPUBLIQUE
> WHEREAS MAROC REPUBLIQUE existe in my collection
> please help my
>

AddThis Social Bookmark Button