[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 718
  • Last Modified:

Visual Studio 2005 ListView - Delete Selected item

Hi

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

Thanks
0
Murray Brown
Asked:
Murray Brown
1 Solution
 
Wayne Taylor (webtubbs)AstronautCommented:
Hi murbo,

Use something like this....

    ListView1.SelectedItems(0).Remove()

Regards,

Wayne
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks
0
 
samalrajCommented:
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now