473,789 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Bind SQL table to TreeView

Hi!

I have a table containing three columns, containing following data..

ID, SUB, DESCRIPTION
1,0,Main
2,0,Main2
3,2,Main2 Subto2

What i want to do is to fill the tree view with the data

if sub is non zero, i want to create a subtree of ID...
Is it possible or do i have to fill a DataSet, read all data and manually
set the data to the treeview?

Regards
Martin
Nov 17 '05 #1
1 2547
You will have to create a typed DataSet and add a relation between the
ID field and SUB field. If you are using the standard TreeView you
will then have to use the relation to navigate the data and add nodes
to the TreeView programatically .

If you are willing to consider a commercial solution Infralution's
Virtual Tree can make this last part much easier. It provides a
flexible data binding mechanism that allows you to bind directly to the
data in the dataset - so you don't have to do this manually.

You can find more information and a fully functional evaluation version
at:
www.infralution.com/virtualtree.html

Regards
Grant Frisken
Infralution

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2105
by: Mark | last post by:
Is it possible to bind that control to data? ADO recordset, XML?? Thanks
0
906
by: Bart Schelkens | last post by:
I have a treeview in my website. I've put it in a table so the other items on the page are standing next to the treeview. Now if I expand my treeview, my table doesn't grow along with the treeview. Does anyone have an idea on how to fix this problem?
5
1398
by: Jaybuffet | last post by:
a custom object. Similar to how I bind a collection of objects to a repeater. Is there a way to bind a single object to a Table? I could use a repeater, but seems over kill for a single object. Thanks for any help.
2
2070
by: das | last post by:
hi all, i want to create dynamic treeview in asp.net 2.0& bind with sqlserver2005 table. the depth can beanynumber, so that the end user can create any number of child nodes & bind with ss2k5 table plz help with any pointers or code snippet
1
2460
by: James Coleman | last post by:
I am using the TreeView control in ASP.NET 2.0 and like it. However, our sitebuilders aren't too pleased with the idea of the table that gets rendered. They are big into avoiding <table> tags when it comes to site build. So is there a way I could have the following html be rendered from the treeview control? <div class="rightNavHighlight"><a href="#">Ergonomics</a></div> <div class="rightNavHighlight"><a href="#">Environmental
1
1341
by: Chris | last post by:
Does anyone know how to bind relational datasouces to the treeview control in ASP.NET 2. It won't let me bind a dataset.
9
3522
by: keliie | last post by:
Hello (from Access novice), I'm building a switchboard form (using a Treeview object). The treeview is populated by two tables (tblSwitchboardParent and tblSwitchboardChild). Within tblSwitchboardChild, I have a string field called ChildArgument that contains string text of VBA code (e.g., DoCmd.OpenForm "myForm"). When users click on various portions of the Treeview object I want the Tree to either expand or open the report / form.
7
4540
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent records. Should I design a new form for this or can I somehow make this work in the same form. Thanks in advance, john
1
6168
by: renuami | last post by:
Hello Please advise .... I do not know in which section i should be posting Winforms Questions. There is not Option. So i am posting it here... apologize for any inconvinence..... This is my first time working with treeview control in winforms. Can someone please help me how to bind data to winforms tree view from 3 tables. I need the out put as follows I need the output as.
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.