Hi, i have a checkbox column in a datagridview. when i select it i want that rows data to move into a listbox.
i did that like this
now it add the cell information to the listbox, what i want to do now is if they uncheck that column that they have already checked then it must remove the corresponding data from the listbox.
is this possible ?
i did that like this
Code:
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
If DataGridView1.CurrentRow.Cells(0).Selected = True Then
ListBox1.Items.Add(DataGridView1.CurrentRow.Cells(1).Value.ToString())
End If
End Sub
is this possible ?
Comment