Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Where is ListViewItem Key  Property ?

Posted on 2005-05-09
5
Medium Priority
?
1,045 Views
Last Modified: 2008-01-09
Hi Experts

   How can we implement Key propery in ListViewItem  in VB.net ?
   
Shiju
0
Comment
Question by:Shiju Sasidharan
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 2000 total points
ID: 13959496
Add a hashtable or collection to your form like

Dim myItems As New Hashtable

        For x As Integer = 0 To 10
            Dim y As New ListViewItem(x.ToString)
            myItems.Add(x, y)
            ListView1.Items.Add(y)
        Next

then you can cast them back to the listviewitem

like

directcast(myitems(1),listviewitem).text = "whatever"
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 13959596
I predict that Ronald will be the first VB.NET millionaire :)

Bob
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 13959616
Good morning Bob :-),
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 13959626
Good afternoon, Ronald :)

Bob
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question