Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb.net Listview issue

Status
Not open for further replies.

Jay2003

Programmer
Joined
Feb 26, 2003
Messages
147
Location
GB
Hi,

I have a problem with populating a listview from a datagrid.

Basically I am looping through the grid and populating the listview on certain criteria. My problem is that I am always missing the last record.

I have setup a messagebox to pop every time a record is about to be added lvmain.items.add(lvi) but the last record never shows.

Also, I always seem to get a blank entry on the very first line of the listview control.

Any ideas.

Jason
 
I sometimes forget that VB.Net is zero based, e.g. in many cases the looping must start at zero not one. Could that be part of the issue you are seeing?

Lion Crest Software Services
Anthony L. Testi
President
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top