]Is that possible to highlight the row when the cell value is change ? Can anyone teach me and explain to me ?
Thanks
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim update As New dboperation
Dim t As DataGridViewSelectedRowCollection = Me.DataGridView1.SelectedRows
update.makeconnection()
If (Me.DataGridView1.Rows(t(0).Index).Cells(0).Value.ToString) = "" Then
update.save("INSERT INTO tbuser (uname, upass, fullname, ustatus) VALUES ('" & DataGridView1.Rows(selectedrow).Cells(1).Value & "','" & DataGridView1.Rows(selectedrow).Cells(2).Value & "','" & DataGridView1.Rows(selectedrow).Cells(3).Value & "'," & DataGridView1.Rows(selectedrow).Cells(4).Value & ")")
Else
update.save("UPDATE tbuser SET uname='" & DataGridView1.Rows(selectedrow).Cells(1).Value & "',upass= '" & DataGridView1.Rows(selectedrow).Cells(2).Value & "',fullname= '" & DataGridView1.Rows(selectedrow).Cells(3).Value & "',ustatus= '" & DataGridView1.Rows(selectedrow).Cells(4).Value & "' WHERE uid= " & DataGridView1.Rows(selectedrow).Cells(0).Value & "")
End If
update.closeconnection()
update = Nothing
End Sub