Hi Friends,
I have 3 textboxes with lines that I'm trying to add to 3 columns in a Listivew1. I am trying to get the TextBox1.Lines into Listview1 Column1, TextBox2.Lines into Listview1 Column2, & TextBox3.Lines into Listview1 Column3.
I have tried to put the TextBox.Lines into an array & send them into each column in the listview, but it's not working. Here's the code that I'm using:
Here's what my form looks like:
SO I NEED:
Numbers 1,2,3,4,& 5 from TextBox1.Lines should go into Column1
Numbers 6,7,8,9,&10 from TextBox2.Lines should go into Column2
Numbers 11,12,13,14,& 15 from TextBox3.Lines should go into Column3
I would appreciate a simple code snippet. Thanks again.
I have 3 textboxes with lines that I'm trying to add to 3 columns in a Listivew1. I am trying to get the TextBox1.Lines into Listview1 Column1, TextBox2.Lines into Listview1 Column2, & TextBox3.Lines into Listview1 Column3.
I have tried to put the TextBox.Lines into an array & send them into each column in the listview, but it's not working. Here's the code that I'm using:
VB.NET:
Dim Item As ListViewItem
For Each Product1 In TextBox1.Lines
Item = ListView1.Items.Add(Product1)
Next
For Each Product2 In TextBox2.Lines
Item.SubItems.Add(Product2)
Next
For Each Product3 In TextBox3.Lines
Item.SubItems.Add(Product3)
Next
Here's what my form looks like:
SO I NEED:
Numbers 1,2,3,4,& 5 from TextBox1.Lines should go into Column1
Numbers 6,7,8,9,&10 from TextBox2.Lines should go into Column2
Numbers 11,12,13,14,& 15 from TextBox3.Lines should go into Column3
I would appreciate a simple code snippet. Thanks again.