Solved

Visual Studio 2005 ListView - Delete Selected item

Posted on 2007-11-13
3
704 Views
Last Modified: 2013-11-26
Hi

I have several multicolumn ListView controls in VS 2005 Visual Basic.
How do I delete the selected line of a ListView.

Thanks
0
Comment
Question by:murbro
3 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 20277991
Hi murbo,

Use something like this....

    ListView1.SelectedItems(0).Remove()

Regards,

Wayne
0
 

Author Comment

by:murbro
ID: 20278001
thanks
0
 
LVL 3

Expert Comment

by:samalraj
ID: 20278004
hi Murbro,

try this
for i as integer = Listview1.selecteditems.count -1 to 0 step -1
ListView1.Items(i).Remove
next

Regards,
Amal
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now