سلام !! ببخشید دیر جواب دادم به کامپیوتر دسترسی نداشتم !
این کد اپدیت هستش !!
اگه توضیح هم نیاز داشتی بگو که برات توضیح بدم .

    Private Sub DataGridView1_CellEndEdit(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) _
Handles DataGridView1.CellEndEdit

Dim cmd As New SqlCommand
Dim cnn As New SqlConnection

cnn.ConnectionString = "Data Source=.;Initial Catalog=Spec;Integrated Security=True"
With cmd
.Connection = cnn
.CommandText = "UPDATE Test Set Firstname = @fname, Lastname = @lname, Can = @Can Where ID = @id"
If (cnn.State = ConnectionState.Closed) Then
cnn.Open()
End If
With .Parameters
.Clear()
.AddWithValue("@fname", DataGridView1.CurrentRow.Cells(1).Value.ToString() )
.AddWithValue("@lname", DataGridView1.CurrentRow.Cells(2).Value.ToString() )
.AddWithValue("@Can", Convert.ToBoolean(DataGridView1.CurrentRow.Cells(3 ).Value))
.AddWithValue("@id", Int(DataGridView1.CurrentRow.Cells(0).Value))
End With
.ExecuteNonQuery()
End With
cnn.Close()

End Sub