Using Listview CF 2.0

K

Koen Vergucht

Hi,

I am using CF 2.0 to develop a VB application for the Datalogic Memor. For a
reason I can't use the listview component properly...

I am trying to populate a listview with 2 columns.
I have tried to define the columns in design-mode and also during runtime,
but the columns do not get created.
The values that are read from the file are like VALUEA;VALUE2. once splitted
they should each appear in 1 column of the listview.

Does anyone know what I am doing wrong?? - THX!!

lvwColumn = New ColumnHeader()
lvwColumn.Text = "Code"
lvwColumn.Width = 60
LvKlanten.Columns.Add(lvwColumn)

lvwColumn = New ColumnHeader()
lvwColumn.Text = "name"
lvwColumn.Width = 60
LvKlanten.Columns.Add(lvwColumn)

Do Until oRead.Peek = -1

strklant = oRead.ReadLine()
teller = teller + 1
'MsgBox(strklant)
klantArray = Split(strklant, ";")
'MsgBox(klantArray(1))

Dim LItem As New ListViewItem()
LItem.Text = klantArray(0)
LItem.SubItems.Add(klantArray(1))
LvKlanten.Items.Add(LItem)
Loop

oRead.Close()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top