CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    removing items from listview

    How to remove checked items from listview when listview checkboxes are on.


  2. #2
    Join Date
    Nov 1999
    Location
    India
    Posts
    4

    Re: removing items from listview

    hi,
    i assume that you want to delete all selected items, just like in hotmail... Here is a piece of code that works fine for me. If you find any problem please do get back to me.

    private Sub cmdDeleteAllSelectedItems_Click()
    Dim noMoreCheckedItems as Boolean
    Dim item as ListItem
    Do
    noMoreCheckedItems = true
    for Each item In myList.ListItems
    If item.Checked then
    myList.ListItems.Remove item.Index
    noMoreCheckedItems = false
    Exit for
    End If
    next
    Loop Until noMoreCheckedItems
    End Sub




    Regards,

    fundooMani

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured