0

hello guys,

can anyone help me with this plz??
i have a datagrid view that is bound to a database, and the is a checkbox that is also bound to a flg in this database.

i want to put some conditions on checking or unchecking this flg.

what event do u suggest to do this condition on? and how can i recheck or uncheck the check box in the datagridview after the conditions get uplied

i have tried this code but i still have a problem with checking the checkbox!!

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles TransactionsDataGridView.CellContentClick
If Me.TransactionsDataGridView.Columns(e.ColumnIndex).Name = "DataGridViewCheckBoxColumn1" Then
  If TransactionsDataGridView.CurrentRow.Cells(7).Value = True Then
      MsgBox("Deleted transactions can not be undeleted")
  Else
     Dim result As DialogResult = MessageBox.Show("Are you shure you want to delete this transaction?", "Mobile Phone Solution", MessageBoxButtons.YesNo)
      If result = Windows.Forms.DialogResult.Yes Then
      End If
   End If
  End If
End Sub

thank you for the help.

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by Commando123
0

but the checkbox is a coulmn in datagried view not an ordinary checkbox!!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.