N
Norman Fritag
Hi there
I like to populate a Listview with data. all the Program does is adding the
data to the first column.
There are five columns and I like to get the data into the appropriate
columns, not just into the first??
Where am I going wrong??
Here is the code snipple:
listviewdisplay is set to detail and It has 5 columns nothing else fancy
going on
' start ********************************
Dim itmx As ListViewItem
Dim item1 As New ListViewItem("item1", 1)
Dim item2 As New ListViewItem("item2", 2)
Dim item3 As New ListViewItem("item3", 3)
Dim item4 As New ListViewItem("item4", 4)
'
'
do
If FP.bList Then
'get the data, so add it to the listview
itmx = New lvExample.Items.Add(sTmp)
lvExample.Items.Add(LCase(sTmp)) ' works ok adds data to column 0
item1 = New ListViewItem("Item1", 1)
item1.SubItems.Add( sTmp & aName)
item3 = New ListViewItem("Itme3",3) ' desn't add anything to column 3 ??
item3.SubItems.Add(Somename)
item2 = New ListViewItem("Item2", 2) ' desn't add anything to column 2??
item2.SubItems.Add(somedata)
item4 = New ListViewItem("Item4", 4)
item4.SubItems.Add(somecasedata) ' desn't add anything to column 4
End If
Loop While aName = ""
' end codesnipple*************************************
I like to populate a Listview with data. all the Program does is adding the
data to the first column.
There are five columns and I like to get the data into the appropriate
columns, not just into the first??
Where am I going wrong??
Here is the code snipple:
listviewdisplay is set to detail and It has 5 columns nothing else fancy
going on
' start ********************************
Dim itmx As ListViewItem
Dim item1 As New ListViewItem("item1", 1)
Dim item2 As New ListViewItem("item2", 2)
Dim item3 As New ListViewItem("item3", 3)
Dim item4 As New ListViewItem("item4", 4)
'
'
do
If FP.bList Then
'get the data, so add it to the listview
itmx = New lvExample.Items.Add(sTmp)
lvExample.Items.Add(LCase(sTmp)) ' works ok adds data to column 0
item1 = New ListViewItem("Item1", 1)
item1.SubItems.Add( sTmp & aName)
item3 = New ListViewItem("Itme3",3) ' desn't add anything to column 3 ??
item3.SubItems.Add(Somename)
item2 = New ListViewItem("Item2", 2) ' desn't add anything to column 2??
item2.SubItems.Add(somedata)
item4 = New ListViewItem("Item4", 4)
item4.SubItems.Add(somecasedata) ' desn't add anything to column 4
End If
Loop While aName = ""
' end codesnipple*************************************