473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

TreeView Control and DataRelations

I have a dataset that contains multiple tables, each with the same
structure, and each tied to the next through a datarelation object. The
number of tables in the dataset can fluctuate. I am stuck on figuring
out the best way to use this structure to populate a tree view control.
I've experimented with recursive calls to the same method without much
success, though I've not abandoned this idea. Any suggestions?

Data structure:
column["pageID"]
column["pageParentID"]
column["pageTitle"]

Data relation:
parent column["pageID"]
child column["pageParentID"]

child rows can also be parent rows...

*** Sent via Developersdex http://www.developersdex.com ***
Feb 27 '07 #1
1 1454
Hi Phil,

I beleive this may help you
http://www.vikramlakhotia.com/post.aspx?postid=127 but you will still need
to correctly setup your tables and data for recursive lookups. I personaly
have used three tables i.e. faq, faq_cat, faq_sub_cat and it works in a
treeview.

Hope this helps

"Phil Townsend" wrote:
I have a dataset that contains multiple tables, each with the same
structure, and each tied to the next through a datarelation object. The
number of tables in the dataset can fluctuate. I am stuck on figuring
out the best way to use this structure to populate a tree view control.
I've experimented with recursive calls to the same method without much
success, though I've not abandoned this idea. Any suggestions?

Data structure:
column["pageID"]
column["pageParentID"]
column["pageTitle"]

Data relation:
parent column["pageID"]
child column["pageParentID"]

child rows can also be parent rows...

*** Sent via Developersdex http://www.developersdex.com ***
Feb 28 '07 #2

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

Similar topics

5
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a...
2
by: tzvikaz | last post by:
Let's say I have this db: Table: Companies ------- Ford Toyota BMW Table: CarTypes --------
8
by: Hrvoje Voda | last post by:
What is wrong in this code? private void tree_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Enter ) {
0
by: George Durzi | last post by:
I have a DataSet with 3 tables, and two DataRelations dsSubs.Tables.TableName = "Subscriptions" dsSubs.Tables.TableName = "AccountManagers" dsSubs.Relations.Add "AccountManagers_Subscriptions",...
3
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%""...
4
by: Ben Coats | last post by:
Hey, I'm trying to find code for an Explorer-style Directory ComboBox. (You know, it display "Desktop", "My Computer", all drives, etc., but it has a treeview control inside the combobox so that...
10
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a...
1
by: musosdev | last post by:
Hi guys I was using the Microsoft.Web.UI.WebControls extra namespace in my application to provide me with a TreeView control. I was using specifically ..GetNodeFromIndex(), SelectedNodeIndex and...
1
by: Phil Townsend | last post by:
I have a dataset that contains multiple tables, each with the same structure, and each tied to the next through a datarelation object. The number of tables in the dataset can fluctuate. I am stuck...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.