AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Syed Rizwan Muhammad Rizvi
Expertise
I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.

Experience
Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > many to many in treeView

Topic: VB.NET



Expert: Syed Rizwan Muhammad Rizvi
Date: 10/28/2007
Subject: many to many in treeView

Question
Hi
How can I show a many to many relation in treeview?
I have a self referencing table in db and i wanna show it in treeview.
I know how to do this with one to many ;
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=10...

the problem is that my table has many to many self reference and it has an interfavce table too:
myTable 1 - m interfaceTable
myTable 1 - m interfaceTable

how can i show this in a treeView? for example:

-+-A-+-A1
+   +
+   +-A2
+
+-B-+-B1
    +
    +-A1

thanks

Answer
Not that difficult you would need to build a recursive function which is passed a node and PK value. The function then in turn before (or after) adding a node to the tree calls its self to check if any child nodes exist for that PK.

Let me know if you need further help.

Regards,
Rizwan

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.