Solved

TextBox does not update dataset until you move focus off it

Posted on 2009-07-07
3
317 Views
Last Modified: 2012-06-27
Hi,

If I type something into a textbox it does not update my dataset until i move the focus off the textbox with tab. If I click a menustrip button this is a problem, because the textbox is not updating the dataset.

How can I force the textbox to update?

thx
0
Comment
Question by:zattz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
JohnBobH earned 500 total points
ID: 24799877
zattz,

You can try a heap of methods here:

You could override the onclick event and perform checks there?
You could try using the LostFocus event?
You could setup an event in your menustrip to perform the check?

All ideas - implementation would depend on the specific application.

Cheers,
JohnBob
0
 
LVL 16

Expert Comment

by:CuteBug
ID: 24800054
Handle the textChanged event.

But this event will be fired each time the a character is added to or removed from the textbox. Do you want it this way?

Another option would be to add a button next to the Textbox and give it the name Update.

Once the user has entered the required text in the textbox, he has to click on the button to update the dataset.
(Handle the click event of the button for this purpose)
0
 

Author Comment

by:zattz
ID: 24800498
After some reading it seems this is normal behaviour for the textbox, so I put some code in the mouseover of the menustrip
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question