i have a problem in my code
i can't get the best answer on how to double click the data in the listview and store the value in the textbox in the other form
pls help me.
I am very please for your response
this is for my project..
thank you..

Recommended Answers

All 3 Replies

What code are you using and where is it going wrong?

If the user double clicks on the first column you can do

Private Sub ListView1_DoubleClick(sender As System.Object, e As System.EventArgs) Handles ListView1.DoubleClick
    Dim lvw As ListView = sender
    Dim item As ListViewItem = lvw.SelectedItems(0)
    frmOther.TextBox1.Text = item.SubItems(0).Text
End Sub

If the ListView has FullRowSelect set to True then the user can click in any column to select that row. Access any other column by

frmOther.TextBox1.Text = item.SubItems(1).Text
frmOther.TextBox1.Text = item.SubItems(2).Text

etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.