|
-
Oct 29th, 2003, 05:01 AM
#1
Thread Starter
Hyperactive Member
delete listview item
I use this code to remove the item in a ListView.
Dim lvi As ListViewItem = DirectCast(ListView1.Items(1), ListViewItem) '/// where (1) is the index of the item
ListView1.Items.Remove(lvi)
But if there's only one item in the listview, I encounter an error.
What code should I write?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|