TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Administrator
Tech Writer
2.2k
1.5m
How to Retrieve a ListviewItem
Mar 21 2003 4:49 AM
Hi, I am new to c# (moving across from the VB6 world), and have a question which I haven't been able to figure out the answer to. Basically put, is there any way you can retrieve a ListviewItem by a key value (NOT THE INDEX). In VB this is very easy, for example; Dim loItem As MSComctlLib.ListItem With ListView1 .ListItems.Add , "prussell", "Paul Russell" .ListItems.Add , "dburton", "Dexter Burton" .ListItems.Add , "jthornton", "James Thornton" End With Set loItem = ListView1.ListItems("dburton") If Not loItem Is Nothing Then Debug.Print "Found Dexter Burton" End If I know that I can work around the problem by looping through the ListviewItems in the ListView.Items collection and comparing one of the columns to a key value, but this is a very inefficient way of doing this. Is there anyway that this can be done in c#? Any help would be greatly appreciated NBK
Reply
Answers (
1
)
Embed Microsoft Word into Form
Getting your last saved record in database