I have a datagridview, dgv1 with 10 columns in C # form, it is limited to a DB table. The second column is a field with a list of values, closing / opening / for review. The user can change the vauli in any cells. After making changes, the user can click the "Save" button to save the changes to the DB table. But before saving the change, it is necessary to perform one more task: if any value of the second column has changed, it is necessary to call the database stored procedure.
My problem is that I don’t know how to find out if the value of the cell has changed or not, and I also need to know the previous values, the previous and current values should go to the stored procedure.
foreach (DataRow rows in dtList.Rows) { if(rows.RowState.ToString() == "Modified") { if(rows.cell(1) is changed) { call stored procedure here... } } i++; }
source share