Tony Peter
asked on
datagridview & mysql updating error
I am using below code to update mysql view through datagridview
This code working very well, except that it updates all records except the last record only, although I see it updated in the datagridview
I have tried to refresh the datagrid or use it's update method, without any luck
F.Y.I: this may ssems very simple for the professionals, but I tried on this for several hours on google without any luck,. also I have pasted only a few lines of the code, which includes huge lines.
Thanks in advance for your help
For Each row1 As DataGridViewRow In DataGridView2.Rows
If Not row1.IsNewRow Then
DataGridView2.CurrentCell = DataGridView2(0, ii)
DataGridView2(2, ii).Value = intCaja
ii = ii + 1
End If
'Application.DoEvents()
DataGridView2.EndEdit()
da1.Update(ds1, "data")
Next
This code working very well, except that it updates all records except the last record only, although I see it updated in the datagridview
I have tried to refresh the datagrid or use it's update method, without any luck
F.Y.I: this may ssems very simple for the professionals, but I tried on this for several hours on google without any luck,. also I have pasted only a few lines of the code, which includes huge lines.
Thanks in advance for your help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.