Click here to Skip to main content
15,124,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
all i want is to display the record in column 16 vertically..
but they appeared in column 2
but if i use subitem they appear horizontally

please help

While objDataReader.Read

    Dim item As ListView
    Dim row As ListViewItem = Me.lstLicense.Items(0)

    With row
        lstLicense.Items.Add(16).Text = (objDataReader("Division"))

    End With
Herman<T>.Instance 13-Sep-11 11:33am
what is the exact problem?

1 solution

You can not add a data in any column by this statement:

lstLicense.Items.Add(16).Text = (objDataReader("Division"))

Items are rows in ListView rather than a column, a subitem within a item can lead you to a specific cell that you are looking for.

so to do what you are looking for you need to a create an item which has 16 subitems and then you can add the item to the ListView. The example on this page would help you how to do it:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900