Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim list As New ListViewItem If dataGrid2.SelectedRows.Count >= 0 Then For Each row As DataGridViewRow In dataGrid2.SelectedRows bookList.Items.Add(row.Cells(1).Value.ToString()) list.SubItems.Add(row.Cells(2).Value.ToString()) bookList.Items.AddRange(New ListViewItem() {list}) Next Else MsgBox("Select a Book!", MsgBoxStyle.Exclamation, "Warning") End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)