Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a textbox enter event calling a search form inserting value to datagridview. first line is loaded to datagridview successfully.

my problem is when i am about to start for a new line the textbox enter event is not refreshed.

I need a code to refresh the textbox enter event so when i enter search key the form will be called again on textbox enter event.

TY :)
Posted

1 solution

Try the TextBox.TextChanged[^] event instead of the Enter event - it triggers every time teh text is changed, so it is probably a lot more suitable for your purposes.
 
Share this answer
 
Comments
Sanket Saxena 15-Apr-14 5:30am    
Correct.. :)
Member 10717094 15-Apr-14 8:45am    
i chose enter event coz the previous control is a search textbox that's why calling of form would be activated with no keypress in the next textbox control, i tried textchanged but it just triggers when there is changes on the textbox enter event is most ideal but my problem is it cant be refreshed to be used to the next line. is there any other approach for putting multiple lines in one transaction as per item sales.
OriginalGriff 15-Apr-14 8:53am    
Sorry? That doesn't make any real sense to me.
Could you try saying that again, but remembering that I can't see your screen?
Member 10717094 15-Apr-14 10:14am    
i have a datagridview unbound.
1 button add new
6 textbox search,description,dosage,qty,selling price,amount
search is a filter for the pop up form displaying choices of items to choose and passing
it to the line then input qty and first line will be complete and when button addnew is clicked first line will be moved to the dgv then all textbox will be cleared to start a new line. that's where my problem comes. when try searching again the event on the description is not activating. is there any alternative approach for inserting multiple lines before saving to database. i am new to c# and glad if you will contribute to my learning. thanks

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