Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AutoCompleteCustomSource and appending values
Message
From
22/05/2007 18:51:44
 
 
To
22/05/2007 06:25:14
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01227568
Message ID:
01227786
Views:
26
With both the Leave and the Validated events, your TextBox should not remain in focus. I've only done a little with this (just to see how it works), so I haven't actually updated the AutoCompleteStringCollection, but it still should not cause the TextBox to not lose focus.

Could you post the code you have in the Leave and/or Validated events?

~~Bonnie



>Hi all!
>
>I have the need to use the textbox's AutoCompleteCustomSource property and adding values at runtime doesn't work as expected.
>
>I have a static method (type AutoCompleteStringCollection) which gets fill with data from a DB at the start of the app, at shutdown these values will be written back to the DB. The textbox uses these values for autocompletion - so far so good.
>
>Newly entered values in the textbox should be saved to the AutoCompleteCustomSource and AFAIK this has to be done manually. Which one is the right event to use? Leave, Validated, TextChanged, ...?
>
>Leave and Validated do execute my update routine but the focus remains on the textbox.
>TextChanged causes troubles due to memory read / write and it updates the list with every single character - no good idea.
>
>Any suggestions?
>
>TIA
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform