| | |
add nodes and subnodes to a treeview from sql database by coding in asp.net 2.0
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
Re: add nodes and subnodes to a treeview from sql database by coding in asp.net 2.0
0
#2 Mar 26th, 2007
The easiest way is to write a query to select the data from all 3 tables and put them into a dataset with relationships.
Then you just have to iterate through the first table one row at a time and create a node for it. Then run through that rows child rows one at a time and create a node for them and add them to the parent node, and run through each of the child rows of those rows and do the same.
In pseudo code (as i am more a C# than Vb person)
Then you just have to iterate through the first table one row at a time and create a node for it. Then run through that rows child rows one at a time and create a node for them and add them to the parent node, and run through each of the child rows of those rows and do the same.
In pseudo code (as i am more a C# than Vb person)
ASP.NET Syntax (Toggle Plain Text)
..Create Dataset with 3 tables and 2 relationships Create a top node For each table1row in table1 Create table1node Add it to topnode's node for each table2row in table1row.getchildrows() Create table2node Add it to table1node for each table3row in table2row.getchildrows() Create table3node end table3row for each end table2row foreach end table1row foreach
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
Re: add nodes and subnodes to a treeview from sql database by coding in asp.net 2.0
0
#3 Jul 20th, 2009
![]() |
Similar Threads
- Problem Inserting into SQL database on server (ASP.NET)
- Adding a column to an SQL database (VB.NET)
- Convert XML data to sql table through coding in ASP.Net2.0 (IT Professionals' Lounge)
- Insert into sql database (ASP.NET)
- Beginner: Insert, Update, Delete & Search records from/to sql database (ASP.NET)
- URGENT!: Saving Database information from ASP.NET Button (ASP.NET)
- Help with Roles Stored in SQL database (ASP.NET)
- Snyc'n Local SQL database online (MS SQL)
Other Threads in the ASP.NET Forum
- Previous Thread: Online card payment: ASP.Net
- Next Thread: Populating a datagrid with dynamic SQL
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash flv formview gridview gudi iis javascript list listbox menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl





