I am trying to populate a a listview control with items and subitems that a user enters into a group of textboxes on a form. It looks as if some of the code to do this has changed since VB6 and I am confused again. Here is the current code I am using without success:
lvSurgProcedure is the name of my listview control
Any help appreciated.Code:Private Sub btnAddSurgeProcedure(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddSurgProcedure.Click Dim lvItem As New ListViewItem lvItem = txtSurgeProcedure.text lvSurgProcedure.Items.Add(lvItem) lvItem.SubItems(0).Add(dtpSurgPerformed.Text) lvItem.SubItems(1).Add(txtSurgName.Text) lvItem.SubItems(2).Add(txtSurgPhone.Text) lvItem.SubItems(3).Add(txtSurgFacility.Text) lvItem.SubItems(4).add(txtSurgPostOp.Text) End Sub




Reply With Quote