what am I doing wrong?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • WyattM
    New Member
    • Jul 2007
    • 8

    #1

    what am I doing wrong?

    In VB.Net 2005 I am wanting to be able to add to a listview with columns and rows but everytime I try to add something it only goes into first column and down. Can someone please help me. I am getting pretty frustrated. Oh, I am entering the info on one form and trying to get it the list on the next form.

    Public Class Form1

    Private Sub BtnReset_Click( ByVal sender As System.Object, ByVal e As System.EventArg s) Handles BtnReset.Click
    TxtBxID.Text = ""
    TxtBxFirstName. Text = ""
    TxtBxMiddleName .Text = ""
    TxtBxLastName.T ext = ""
    TxtBxAddress.Te xt = ""
    TxtBxPosition.T ext = ""
    TxtBxPhone.Text = ""
    TxtBxSSN.Text = ""
    End Sub
    Private Sub BtnClose_Click( ByVal sender As System.Object, ByVal e As System.EventArg s) Handles BtnClose.Click
    Me.Close()
    End Sub

    Private Sub BtnNew_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles BtnAdd.Click

    Me.ListEmployee s.Columns.Add(T xtBxFirstName.T ext)
    Me.ListEmployee s.Items.Add(Txt BxMiddleName.Te xt)
    Me.ListEmployee s.Items.Add(Txt BxLastName.Text )
    Me.ListEmployee s.Items.Add(Txt BxAddress.Text)
    Me.ListEmployee s.Items.Add(Txt BxPosition.Text )
    Me.ListEmployee s.Items.Add(Txt BxPhone.Text)
    Me.ListEmployee s.Items.Add(Txt BxSSN.Text)
    Me.ListEmployee s.Items.Add(Txt BxID.Text)
    End Sub
Working...