Identifying value change and update

  • Thread starter Thread starter RP
  • Start date Start date
R

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.
 
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;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top