473,387 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

textbox changes

I have 4 textBoxes.
I would like to see if a user has write something in any of them, so that I
can ask him to save it into dataset.
How could I check for all 4 at once, so I don't have to ask for every one in
single ?

Hrcko
Nov 17 '05 #1
3 1291
"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d5**********@ss405.t-com.hr...
I have 4 textBoxes.
I would like to see if a user has write something in any of them, so that
I can ask him to save it into dataset.
How could I check for all 4 at once, so I don't have to ask for every one
in single ?

Hrcko


Hi. Catch the TextChanged event in all of the text boxes and set a boolean
in your code that the text has changed. If you wish, you could send the
event for all of the text boxes to the same event handler, to avoid
duplication.

-- Alan
Nov 17 '05 #2
I put a bool into TextChanged event but it's always true.

Hrcko
"Alan Pretre" <al********@newsgroup.nospam> wrote in message
news:eD**************@TK2MSFTNGP15.phx.gbl...
"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d5**********@ss405.t-com.hr...
I have 4 textBoxes.
I would like to see if a user has write something in any of them, so that
I can ask him to save it into dataset.
How could I check for all 4 at once, so I don't have to ask for every one
in single ?

Hrcko


Hi. Catch the TextChanged event in all of the text boxes and set a
boolean in your code that the text has changed. If you wish, you could
send the event for all of the text boxes to the same event handler, to
avoid duplication.

-- Alan

Nov 17 '05 #3
"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d5**********@ss405.t-com.hr...
I put a bool into TextChanged event but it's always true.


Hi. The TextChanged event will get fired also when you are loading the
textbox programatically. You need to make sure that you initialize your
boolean to false AFTER you have done the initial loading of the textbox
contents, but BEFORE the user has a chance to change them.

-- Alan
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Option^Explicit | last post by:
What I'm trying to do: Open a text file and display the contents in a text box (I've done this) Need to be able to edit the file from within the textbox and have it save back to the source...
3
by: Roberto Castro | last post by:
Hello! I have been assigned for the first time an adp Access project and so far I have managed to make the changes needed for some requirements. However, I am struggling to find the place where...
13
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying...
3
by: Nic | last post by:
Hey, I have an ASP-application. In the ASPX I have an <asp:dropdownlist ..>. Now when I leave this control I want to initialisize some other fields. In window forms we uses the onleave event but...
0
by: Alpha | last post by:
Hi, I have a listbox and a textbox which is bind to the same dataset's column. So the selected item is display in the textbox availbe for editing. When I change the text in the textbox it has...
2
by: Alpha | last post by:
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different...
5
by: Steve S | last post by:
Heres what I want to do...User types into a texbox, clicks a button, the button saves that text to a file. The problem is that when I click the submit button, any changes made to the textbox are...
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
1
by: rn5a | last post by:
I want to create a custom control that encapsulates a Button & a TextBox. When the Button is clicked, the user is asked a question using JavaScript confirm (which shows 2 buttons - 'OK' &...
4
by: H-S | last post by:
Please help. This is a real puzzler! Originally posted on microsoft.public.dotnet.framework.windowsforms but no answer found! I have a read-only textBox which shows the results of a selection...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.