Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i m a beginner in vb .net

my problem is dunno how 2 select a value from a listview

let says i have 3 columns in my list view column1, column2, column3. n i want to select a value from column 1 n assign it to a textbox

 

pls help me !!! thx in advance:D

  • Leaders
Posted
   Private Sub ListView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.Click
       If Not ListView1.SelectedItems.Count = 0 Then
           MessageBox.Show(ListView1.SelectedItems(0).SubItems(1).Text) '/// 1 being the subitem in column 1
       '/// just putting TextBoxname.Text = inplace of the MessageBox.Show
       End If
   End Sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...