I'm a little new for DataGrid controls, but I'm just wondering why the first block of code below works, but the second block of code does not work? (The only thing I see is
Handles the DataGridClaims
Syntax
Block 1
Private Sub DataGridClaims_CellContentClick_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridClaims.CellContentClick
If e.RowIndex <> -1 Then
Dim frmViewClaims As New objViewClaim
frmViewClaims.ClaimID = DataGridViewClaims.CurrentRow.Cells("ClaimNum").Value
frmViewClaims.Show()
End If
End Sub
Block 2
Private Sub DataGridClaims_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs)
If e.RowIndex <> -1 Then
Dim frmViewClaims As New objViewClaim
frmViewClaims.ClaimID = DataGridViewClaims.CurrentRow.Cells("ClaimNum").Value
frmViewClaims.Show()
End If
End Sub
source
share