about listview control

G

gaffar

i want the code for
i have a listview with 2 columns.if i selected the item of the listview and
clicking on a button the selected item must be displayed on the another
listview control.
 
B

Brian Mitchell

There's probably an easier way of doing this but at least this will give you
a start...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim item As ListViewItem
For j As Integer = 0 To ListView1.SelectedItems.Count - 1
item = ListView1.SelectedItems(j).Clone
ListView2.Items.Add(item)
Next

End Sub

Good luck,
Brian
 
G

gaffar

thank u for sending the immediate reply.

but sir ,
i have told that there are 2 columns selected and only one columns data is
displayed on the listview2 and another columns data also have to
display.please help me
 
H

Herfried K. Wagner [MVP]

gaffar said:
i want the code for
i have a listview with 2 columns.if i selected the item of the listview
and
clicking on a button the selected item must be displayed on the another
listview control.

I replied to your question in the
"microsoft.public.dotnet.languages.vb.controls" group. Please avoid
multiposts.
 
C

Cor Ligthert

Herfried,
"microsoft.public.dotnet.languages.vb.controls" group. Please avoid
multiposts.

It is real a post in that newsgroup. And it stays still 5 days on top even
because it is topposted.
(Or can it be it was maybe 8-1-2004 and the OP waited that long?)

:))

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top