|
-
Jun 14th, 2004, 01:20 PM
#1
Thread Starter
Lively Member
Remove ListView Item That user selected
Anyone can show me how to remove the listview item that user selected ?
in my listview i have the data below
name age sex hobby
1 1 1 1
2 2 2 2
3 3 3 3
if the user click at name number 2 how do i remove the row of it ????
thanx
VB Code:
Remove ListView Item That user selected
-
Jun 14th, 2004, 01:30 PM
#2
Frenzied Member
VB Code:
ListView1.Items.Remove(ListView1.SelectedItems.Item(0))
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Jun 14th, 2004, 01:49 PM
#3
Thread Starter
Lively Member
thanx for the helping
thanx for the helping, it works
now i have another problem is that
after i remove the item, how i want to get the value that before removing ???
example
Name age sex hobby
1 1 1 1
2 2 2 2
3 3 3 3
when i remove the name number 2, can i get the sex value that name is number 2 ????
like
when i remove the name number 2 and i will get the sex value is number 2
thanx
-
Jun 14th, 2004, 08:10 PM
#4
Lively Member
VB Code:
dim l as listviewitem=listview1.selecteditems.item(0)
dim s as listviewitem.subitem
for each s in l.subitems
messagebox.show(s.text)
next
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
|