Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView2.CellClick
If e.RowIndex < 0 Then Exit Sub
If e.ColumnIndex < 0 Then Exit Sub
If DataGridView2.Columns(e.ColumnIndex).Name = "Select" Then
If DataGridView2.Rows(e.RowIndex).Cells("Select").Value = "P" Then
DataGridView2.Rows(e.RowIndex).Cells("Select").Value = ""
Else
DataGridView2.Rows(e.RowIndex).Cells("Select").Style.Font = New Font("Wingdings 2", 10, FontStyle.Bold)
DataGridView2.Rows(e.RowIndex).Cells("Select").Value = "P"
End If
End If
End Sub
If e.RowIndex < 0 Then Exit Sub
If e.ColumnIndex < 0 Then Exit Sub
If DataGridView2.Columns(e.ColumnIndex).Name = "Select" Then
If DataGridView2.Rows(e.RowIndex).Cells("Select").Value = "P" Then
DataGridView2.Rows(e.RowIndex).Cells("Select").Value = ""
Else
DataGridView2.Rows(e.RowIndex).Cells("Select").Style.Font = New Font("Wingdings 2", 10, FontStyle.Bold)
DataGridView2.Rows(e.RowIndex).Cells("Select").Value = "P"
End If
End If
End Sub
No comments:
Post a Comment