ListView: Remove items *AND* rows??? 
Author Message
 ListView: Remove items *AND* rows???

Can anyone tell me how to *reliably* empty a ListView control of ALL its
items.

I've tried "clear" and I've tried looping through each item and removing
it, as in:

        For i = 1 To lvMyListView.ListItems.Count
            Me.lvMyListView.ListItems.Remove (1)
        Next i

... I keep ending up with a ListView which contains blank rows where the
items used to be.  In other words, the text is being removed, but not
the rows themselves.  As a result, when I re-fill the listbox from a
recordset, some ListView rows contain the proper recordset information,
but beneath those rows is a series of blank rows.

What the heck am I doing wrong?



Tue, 29 May 2001 03:00:00 GMT  
 ListView: Remove items *AND* rows???


Quote:
>Can anyone tell me how to *reliably* empty a ListView control of ALL its
>items.

>I've tried "clear" and I've tried looping through each item and removing
>it, as in:

>        For i = 1 To lvMyListView.ListItems.Count
>            Me.lvMyListView.ListItems.Remove (1)
>        Next i

>... I keep ending up with a ListView which contains blank rows where the
>items used to be.

So you've tried

Me.lvMyListView.ListItems.Clear

and it didn't work?



Tue, 29 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Remove a single row from a Listview control

2. ListView Control - Removing selected items from the list

3. Removing an item from a listview

4. Removing an item from a ListView

5. help adding and removing items from a listview

6. Q: How to get rid of ListView flicker when adding/removing items

7. SHFileOp and removing corresponding items from ListView

8. removing items from a listview

9. Remove Selected item in ListView Control

10. ListView items remain indented after removing icons

11. How to remove items in a listview?

12. Remove selected items from a listview control in report format

 

 
Powered by phpBB® Forum Software