|
-
December 28th, 1999, 02:17 PM
#1
Urgent!!!!!!
Hi everybody
can i select multiple columns or rows from a listview.
Actually what i want to do is i want to select multiple rows or columns from a listview and extract the selected rows/columns in some array and perform some operations on those values.
thanx in advance
-
December 29th, 1999, 01:41 AM
#2
Re: Urgent!!!!!!
Hi.
Selection of multiple rows is possible. Here is a sample code on how to do it. If you have other questions e-mail me at [email protected]
option Explicit
private Sub cmdOk_Click()
Dim i as Integer
Dim t as string
for i = 1 to lvwList.ListItems.Count
If lvwList.ListItems.Item(i).Selected = true then
t = lvwList.ListItems.Item(i).Text + _ lvwList.ListItems.Item(i).SubItems(1) + _ lvwList.ListItems.Item(i).SubItems(1)
End If
next
End Sub
private Sub Form_Load()
With lvwList.ListItems.Add(, , "Test1")
With .ListSubItems.Add(, , "Test1.2")
End With
With .ListSubItems.Add(, , "Test1.3")
End With
End With
With lvwList.ListItems.Add(, , "Test2")
With .ListSubItems.Add(, , "Test2.2")
End With
With .ListSubItems.Add(, , "Test2.3")
End With
End With
With lvwList.ListItems.Add(, , "Test3")
With .ListSubItems.Add(, , "Test3.2")
End With
With .ListSubItems.Add(, , "Test3.3")
End With
End With
With lvwList.ListItems.Add(, , "Test4")
With .ListSubItems.Add(, , "Test4.2")
End With
With .ListSubItems.Add(, , "Test4.3")
End With
End With
With lvwList.ListItems.Add(, , "Test5")
With .ListSubItems.Add(, , "Test5.2")
End With
With .ListSubItems.Add(, , "Test5.3")
End With
End With
With lvwList.ListItems.Add(, , "Test6")
With .ListSubItems.Add(, , "Test6.2")
End With
With .ListSubItems.Add(, , "Test6.3")
End With
End With
End Sub
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
|