Results 1 to 16 of 16

Thread: [Resolved] Loading Listview Problems.........

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2001
    Location
    Maumelle, AR
    Posts
    624

    [Resolved] Loading Listview Problems.........

    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
    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
    Any help appreciated.
    Last edited by hipopony66; Feb 15th, 2009 at 11:32 AM. Reason: Resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width