I have a datagrid with a number of columns. One column is called AwaitingPayment and contains a checkbox (Yes/No).
How can I delete all rows from my datagridview where checkbox is unchecked ?
I came up with the following in the Datagrid_Load procedure, but it doesnt seem to work :
For Each row As DataGridViewRow In DataGridView1.SelectedRows
Dim AwaitingPaymentColumn As Boolean = False
If AwaitingPaymentColumn = False Then
DataGridView1.Rows.Remove(row)
End If
Next
How can I delete all rows from my datagridview where checkbox is unchecked ?
I came up with the following in the Datagrid_Load procedure, but it doesnt seem to work :
For Each row As DataGridViewRow In DataGridView1.SelectedRows
Dim AwaitingPaymentColumn As Boolean = False
If AwaitingPaymentColumn = False Then
DataGridView1.Rows.Remove(row)
End If
Next