Delete Listview Item 
Author Message
 Delete Listview Item

I have a listview box of items retrieved from a text file called
UserID.dat.  I am able to add items.  I need to remove items either
typos or items not needed any more.  Can't figure out the code and VB
help is not to helpful.

I also have two columns in my listview just incase that is needed
information.  User name and Computername.

Also there is a problem with adding a username with spaces in it.  If
one word works fine but if typed in like John Doe.  I end up with John
computername Doe.  Not sure why it does that.  If I just type in one
word it works fine.

Thanks for any help,
Bob



Wed, 18 Jan 2006 06:57:15 GMT  
 Delete Listview Item
Don't you think showing the code would be helpful?

To remove one Item:
    ListView1.ListItems.Remove Index
where Index is either a number (0-based) or a string the specifies the Item.

To clear the whole list:
    ListView1.ListItems.Clear

It's all in the helpfiles.

Your adding-problem must be because of your code.

Johan.



Quote:
> I have a listview box of items retrieved from a text file called
> UserID.dat.  I am able to add items.  I need to remove items either
> typos or items not needed any more.  Can't figure out the code and VB
> help is not to helpful.

> I also have two columns in my listview just incase that is needed
> information.  User name and Computername.

> Also there is a problem with adding a username with spaces in it.  If
> one word works fine but if typed in like John Doe.  I end up with John
> computername Doe.  Not sure why it does that.  If I just type in one
> word it works fine.

> Thanks for any help,
> Bob



Wed, 18 Jan 2006 16:53:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Deleting ListView items

2. Deleting ListView items

3. Repost: Deleting last listview item

4. Delete last Listview Item

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

6. ListView.EnsureVisible near deleted item

7. listview delete items?

8. Delete multiple listview items?

9. Quick Redraw a ListView After deleting Item(s)

10. Deleting all items from a listview?

11. Delete item in listview

12. Quick Redraw a ListView After deleting Item(s)

 

 
Powered by phpBB® Forum Software