Solved

TextBox does not update dataset until you move focus off it

Posted on 2009-07-07
3
314 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 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