Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
i want to fill dataset on entering matching text value in text box without clicking the button in window application using sql server how it it possible.Please help me
Posted

Three options:
- Control.TextChanged[^]. Note that it is fired whenever the text changes, i.e. if you type 'Hello' you get 5 events. Useful for dynamic filtering of an autocomplete list or similar.
- Control.Leave[^], as mentioned by Nit. (LostFocus also works for this.) Called only when the user leaves the field.
- Use a KeyPress and look for Enter.

A combination of the last two is useful for 'actions': the action is submitted when the user leaves the field or presses Enter. The first is useful for things that should update every character, notably autocomplete lists but possibly also related tasks like preloading of 'guessed' resources or updating other fields.
 
Share this answer
 
Comments
Sandeep Mewara 17-May-11 10:53am    
My 5!
just add an event name Leave to the textbox and write the functionality to this funtion
 
Share this answer
 
Comments
nit_singh 17-May-11 9:48am    
I wont suggest "Control.TextChanged" event which BobJanova suggested, because every time it will hit this event.
BobJanova 17-May-11 9:51am    
Indeed (I mentioned this also). I included it because I'm not totally sure what the OP wants and if it's some sort of filtering then that is useful.

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