Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add multiple columns of data to a listview
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00652554
Message ID:
00654804
Views:
21
This message has been marked as the solution to the initial question of the thread.
>I'm going through a datarowview and adding items to a listview. My listview has two columns, customername and dob. Here is my current code:
>
>
>        Dim drv As DataRowView
>        Dim s As String = ""
>        For Each drv In goView2
>            s = ""
>            s &= RTrim(drv("LastName").ToString) & ", "
>            s &= RTrim(drv("FirstName").ToString) & " "
>            ListBox1.Items.Add(s)
>            ListView1.Items.Add(s.ToString())
>        Next
>
>
>This fills the first column, but I don't know how to add the DOB.
>
>Thanks for any help.
>Kirk


The ListBox object only allows one column to be displayed. You will need to combine the data into a single string to present to the user.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform