There is no position 0 in data grid view.
When the user clicks on the column name, It counts as a click event. Since A row was not clicked the row is set to 0.
Try this
Private Sub DataGridView1_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles EmployeeGrid.CellContentClick
If (e.RowIndex > 0) Then
EmpNo = e.RowIndex
EmpPerInfo.txtSrn.Text = dt.Rows(EmpNo).ItemArray(0).ToString()
EmpPerInfo.txtFullName.Text = dt.Rows(EmpNo).ItemArray(2).ToString()
EmpPerInfo.Show()
End If
End Sub