Displaying a dataArray in a Listview

  • Thread starter Thread starter Darren
  • Start date Start date
D

Darren

Can somebody please tell me what is wrong with the following

Dim J As Integer
For J = 1 To dataArray.Length - 1
lsvCurrentFileList.Items.Add(New ListViewItem(dataArray(J)))
Next J

I can display the contents of a dataArray in a msgbox but when I try it in
a listview the application locks up.

I am trying to send a list of files from a desktop PC to a PocketPC. The
pocket PC recieves it OK as I can display the array in a messagebox but not
in a listview.

Am I missing something here?

I can do it find on the desktop PC in the same way.

Thanks
 
Hi,

Try to explicitly convert the items of the dataArray to string.

Hope this helps,
Sergiy.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Subject: Displaying a dataArray in a Listview
| From: Darren <[email protected]>
| Organization: Your Company
| Message-ID: <[email protected]>
| User-Agent: Xnews/06.01.10
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Date: Sun, 03 Aug 2003 15:15:23 -0700
| NNTP-Posting-Host: public1-macc1-6-cust118.bagu.broadband.ntl.com
213.106.195.118
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:30070
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Can somebody please tell me what is wrong with the following
|
| Dim J As Integer
| For J = 1 To dataArray.Length - 1
| lsvCurrentFileList.Items.Add(New ListViewItem(dataArray(J)))
| Next J
|
| I can display the contents of a dataArray in a msgbox but when I try it
in
| a listview the application locks up.
|
| I am trying to send a list of files from a desktop PC to a PocketPC. The
| pocket PC recieves it OK as I can display the array in a messagebox but
not
| in a listview.
|
| Am I missing something here?
|
| I can do it find on the desktop PC in the same way.
|
| Thanks
|
 
Back
Top