I have a winform having few controls like txtbox,datagridview.

I am loading information in that form .
I am creating query for update dynamicaly depending on which records are changed .
But problem is
how can I identify in which controls(textboxes etc) records get changed?

I have a winform having few controls like txtbox,datagridview.

I am loading information in that form .
I am creating query for update dynamicaly depending on which records are changed .
But problem is
how can I identify in which controls(textboxes etc) records get changed?

I am new to C# and programming in general, but I would have two variables for each control value. Store the value on load as the old value, and keep checking for a new value on the next load. In essence, control-break logic.