Solved

TextBox does not update dataset until you move focus off it

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now