Winform List Columns Not Displayed

I am trying to put a listview on a winform vb.net VS 2010 form. I 1. Draw a list from the toolbox on the form.
2. The right hit was made by the editing columns 3. two columns were added with the names (chLocationID, chLocation) and the text LocationID and Location. 4. When I click ok, nothing is displayed in the list designer.

In the code behind, I made a for loop to add some data.

For Each O In oS Dim itm As New ListViewItem itm.SubItems.Add(O.tblLocationID.ToString) itm.SubItems.Add(O.Location) itm.Tag = O lvLocation.Items.Add(itm) Next 

when I go through the code .. it says it adds the line .. lvLocation.items.count gives me a value of 1 .. which is correct but nothing is displayed on the screen.

So, I did something wrong. Just not sure what?

+8
windows listview
source share
1 answer

Make sure the ListView View property is set to Details, either in the designer or in the code. WinViews ListViews lists only their columns in the form of information.

+13
source share

All Articles