Solved

TextBox does not update dataset until you move focus off it

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

617 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