|
-
Feb 4th, 2004, 10:21 AM
#1
Thread Starter
New Member
ListView Question
I want to be able to add the text to each of my columns in my listview (Which I can do), but I also want to add an ID Number (From my database) for that row of listviewitems. I then want to be able to click on that row in my listview and get the ID number. What property is used for an ID Number in a listview in .net. With the combobox you have the .valuemember, is there something similar with the listview? Anybody have any code examples of doing this? Thanks in advance for your time.
Here's my code (This works to add the text)
While drSearch.Read
Dim lvi As New ListViewItem
lvi.Text = drSearch.Item("Company_Name").ToString(),
With lvi
.SubItems.Add(drSearch.Item("Web_Site").ToString())
.SubItems.Add(drSearch.Item("Industry").ToString())
End With
lstViewSearchResults.Items.Add(lvi)
End While
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|