Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

OK, I'm working with a treeview. I'm adding nodes, but their not regular node objects their custom objects:

 

-----

Private Class nodeObject

Inherits TreeNode

Public Sub New(ByVal prmCode As String, ByVal prmTitle As String, ByVal prmIIndex As Integer)

Text = prmTitle

code = prmCode

ImageIndex = prmIIndex

End Sub

 

Public code As String

end class

 

 

-----

 

and the line I use to add the object is:

 

tvAccounts.Nodes.Item(0).Nodes.Add(New nodeObject("account_number","account_title", 1))

 

----------

 

My question is: When users select an object on the node tree, it raises an "AfterSelect" event. The two paraments sent to the event are:

 

ByVal sender As Object, ByVal e As TreeViewEventArgs

 

Now how do i go about accessing the "nodeobject" custom node object to retrieve the "code" property? because .code isn't part of the standard .node member list. Please help. Thanks.

www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!

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...