Solved

Visual Studio 2005 ListView - Delete Selected item

Posted on 2007-11-13
3
709 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

789 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