473,407 Members | 2,629 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,407 software developers and data experts.

Identifying value change and update

RP
On my Windows Form, I have ten text boxes. I also have a DataGridView.
When a user clicks a row on the DataGridView, the column values get
displayed on their respective text boxes and are available for user to
edit or delete that record.

At present, I am using a boolean variable and it's value becomes true
whenever a user replaces old text in the Text Box with a new text.
When the user clicks a button, it checks whether the value of this
variable is true or not. If yes, it calls the update method.

The problem is that even if the user makes changes in one Text Box,
the update method will perform update for all the columns of the row.
Is there any way to effectively do this task so that only the column
whose value is changed is updated without performing update on other
columns. I don't want to use too many variables.
Dec 25 '07 #1
1 1897
Hi use this event for every text box right this event and with this event u
can update ur particular record.
this event will occur when ur mouse will move

private void textBox1_MouseLeave(object sender, EventArgs e)
{
label1.Text = textBox1.Text;
}

"RP" wrote:
On my Windows Form, I have ten text boxes. I also have a DataGridView.
When a user clicks a row on the DataGridView, the column values get
displayed on their respective text boxes and are available for user to
edit or delete that record.

At present, I am using a boolean variable and it's value becomes true
whenever a user replaces old text in the Text Box with a new text.
When the user clicks a button, it checks whether the value of this
variable is true or not. If yes, it calls the update method.

The problem is that even if the user makes changes in one Text Box,
the update method will perform update for all the columns of the row.
Is there any way to effectively do this task so that only the column
whose value is changed is updated without performing update on other
columns. I don't want to use too many variables.
Dec 26 '07 #2

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

Similar topics

3
by: Jeff | last post by:
I am using SQL Server 2000. I have a table with, say, 20 columns. I have one procedure which updates all 20 columns at once, accepting a parameter for each column. However, I want to be able to...
4
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
0
by: DBQueen | last post by:
I am developing an application for a Pathology Lab. There are Batches (BatchID) which contain multiple Samples (SampleID), and there can be multiple tests run from the same Sample, thus there can...
4
by: John Rose | last post by:
I have one databound TextBox on a page with one button. The TextBox loads the correct SQL record data but typing a new string into the Textbox fails to change the DataSet. Any ideas? There must...
4
by: Martyn Fewtrell | last post by:
I want to update a database record with a number of fields - doesn't sound to difficult at this stage! I have a system to select the correct record from the database and load the data into a...
31
by: Kathy | last post by:
I would like to get the old and new value for a change made to a text box so that I can store them in a change history table. What is the best way to do this? I am just learning VB 2005; porting...
2
by: Jeff Williams | last post by:
I have a windows form which contains various controls like textboxes, comboboxes, checkboxes etc. When the user clicks the ok button I would like to determine if the data has changed in one or...
10
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under...
1
by: kevinlcarlson | last post by:
I have a table containing a 'data' field and a 'status' field. I want to set the 'status' value to 1 for each record that has exactly one occurrence of 'data' in the table. I.e. if the value of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.