adding to list?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2007
Posts: 2
Reputation: WyattM is an unknown quantity at this point 
Solved Threads: 0
WyattM WyattM is offline Offline
Newbie Poster

adding to list?

 
0
  #1
Jul 25th, 2007
In VB.Net 2005 I am wanting to be able to add to a list 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 agrivated.

Public Class Form1

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

Private Sub BtnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAdd.Click

Me.ListEmployees.Columns.Add(TxtBxFirstName.Text)
Me.ListEmployees.Items.Add(TxtBxMiddleName.Text)
Me.ListEmployees.Items.Add(TxtBxLastName.Text)
Me.ListEmployees.Items.Add(TxtBxAddress.Text)
Me.ListEmployees.Items.Add(TxtBxPosition.Text)
Me.ListEmployees.Items.Add(TxtBxPhone.Text)
Me.ListEmployees.Items.Add(TxtBxSSN.Text)
Me.ListEmployees.Items.Add(TxtBxID.Text)
End Sub
Last edited by WyattM; Jul 25th, 2007 at 11:19 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC