參考來源 有附原碼
--
Private Sub DataGridView1_CellMouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseDown
If e.ColumnIndex = 5 Then
If DataGridView1(5, e.RowIndex).Value() = False Then
If MessageBox.Show("Are you sure you want to discontinue this product?", "CheckBox", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
DataGridView1(5, e.RowIndex).Value = True
End If
End If
End If
End Sub
沒有留言:
張貼留言