Delete multiple listview items? 
Author Message
 Delete multiple listview items?

Hello,

I have a listview control that allows multiple row selection.
Can anyone tell me how to remove all selected rows at once?

Any help would be greatly appreciated!
Thanks in advance.



Sun, 29 Aug 2004 01:32:24 GMT  
 Delete multiple listview items?
Here's one way....
'=========
Private Sub cmdDeleteSelected_Click()
   Dim i As Integer
   With ListView1.ListItems
      For i = .Count To 1 Step -1
         If .Item(i).Selected Then
            .Remove (i)
         End If
      Next
   End With
End Sub
'=========

--
Ken Halter
MS-MVP-VB
Please keep it in the groups..


Quote:
> Hello,

> I have a listview control that allows multiple row selection.
> Can anyone tell me how to remove all selected rows at once?

> Any help would be greatly appreciated!
> Thanks in advance.



Sun, 29 Aug 2004 01:34:50 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. deleting multiple item on listbox

2. ListBox (w/Checkboxes)....Deleting Multiple-Selected Items

3. Question: Deleting Multiple Items in ListBox??

4. ListBox (w/Checkboxes)....Deleting Multiple-Selected Items

5. Repost: Deleting last listview item

6. Delete last Listview Item

7. How to iterate through and delete mutiple selected items from a listview

8. Delete Listview Item

9. Deleting ListView items

10. ListView.EnsureVisible near deleted item

11. listview delete items?

12. Deleting ListView items

 

 
Powered by phpBB® Forum Software