Results 1 to 2 of 2

Thread: treeview click event details lagging

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    treeview click event details lagging

    Private Sub TreeView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeView1.Click
    txtProductCode.Text = Microsoft.VisualBasic.Left(TreeView1.SelectedNode.Text, 6)
    End Sub

    My treeview is populated with
    structure
    SAA101...........
    SAA102...........

    and so on. If I click on SAA101 my textbox shows struct when then click on SAA102 it shows SAA101. It doesn't always show the currentselected - 1 but the last one selected. So if I selected SAA101 then selected SAA110 it would show SAA101 when I expect SAA110 and not SAA109.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383
    the click event fires before the selected node is changed (unlike VB6) use the AfterSelect event instead. It fires after the selected node has changed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width