-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Kishor
Message 5 in Discussion

hi limson,
 use this code change the name of your treeControl. I assume you have
populated the dataset, you have set imagelist with images on the form.


With treeStruct
      .ShowRootLines = True
      .ShowPlusMinus = True
      .BeginUpdate()

        'Add first virtual main node
        Dim nodp As New Windows.Forms.TreeNode("Group Name", 0, 0)
        nodp.Tag = 0
      .Nodes.Add(nodp)

'Here dv is dataview... you can replace with the your dataset I am assuming
dataview or dataset is already populated from databse

      For i = 0 To dv.Table.Rows.Count - 1

        Dim nodpX As New Windows.Forms.TreeNode(dv.Table.Rows(i).Item(1), 0,
0) ' Here dv.Table.Rows(i).Item(1) will be your display column
        nodpX.Tag = dv.Table.Rows(i).Item(0)  ' here you will store Primary
Key of the table in your case you dont need this
        nodpX.ImageIndex = dv.Table.Rows(i).Item(3) 'set image
          nodep.nodes.add(nodpX)
      Next
      .EndUpdate()
End With


Regards
Kishor





-----Original Message-----
From: limson [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 12, 2003 11:00 AM
To: MumbaiUserGroup
Subject: Re: treeview in visual basic.net


-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: limson
Message 3 in Discussion

hi kishor              its a single level treeview i just want to show all
the group name.   table structure is gid = number gname = text   where gname
ie groupname that i have to show as tree node on load event of the form.
thanks in advance limson

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your
E-mail Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On
the pre-addressed e-mail message that opens, simply click "Send". Your
e-mail address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to