473,324 Members | 2,417 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,324 software developers and data experts.

Treeview, is there a way to build one dynamically with SQL Data?

Hi,
Sort of new with the whole treeview control and I was wondering is there a way to build a treeview menu using my SQL data I pull from a database instead of having to hard code it into the webpage. Pasted below is my current code but what I would like to do is instead make a table in SQL that data can be added or modified to and have it generate the menu according to the data instead. Thanks for the help,
Mike


<mytree:treeview runat="server" ID="Treeview1" NAME="Treeview1" DefaultStyle="font-family:Microsoft Sans Serif;font-size:12px;padding-top:0px;padding-bottom:0px;margin:0;padding-right:3px;padding-left:3px;border:1px solid #f1f1f1;"
HoverStyle="font-color:#000;font-size:12px;font-family:Microsoft Sans Serif;padding-left:3px;padding-right:3px;background-color:#a1a1a1;border:1px solid #cccccc;"
SelectedStyle="font-size:12px;font-family:Microsoft Sans Serif;padding-left:3px;padding-right:3px;background-color:white;border:1px solid #cccccc;color:black;"
Indent="15" ShowLines="False" SystemImagesPath="/webctrl_client/1_0/treeimages/" SelectExpands="True">
<mytree:treenode text="Home" Target="fraMiddleTopFrame" NavigateUrl="./home.aspx" />
<mytree:treenode text="About District Construction">
<mytree:treenode text="Downloads">
<mytree:treenode text="Best Practices">
<mytree:treenode text="Business Impacts 05/03" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/best practices for business impactsJan 9 04.doc" />
<mytree:treenode text="Consultant Preconstruction Activities 12/05" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/CEI Preconstruction Activities.doc" />
<mytree:treenode text="Estimating Contract Time">
<mytree:treenode text="10/92" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Estimating Contract Time.pdf" />
<mytree:treenode text="02/98" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Construction Time Data Analysis.pdf" />
</mytree:treenode>
<mytree:treenode text="Offer of Final Payment Presentation 11/05" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/FE OFP Presentation.ppt" />
<mytree:treenode text="Reflective Pavement Markers 02/06" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/RPM Best Practices 022206.doc" />
</mytree:treenode>
<mytree:treenode text="Business Plans">
<mytree:treenode text="FY 2006" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/BusinessPlanConstructionall_106.xls" />
<mytree:treenode text="Traffic Operations Tier 3">
<mytree:treenode text="2006" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/2006 TO Business Plan.xls" />
<mytree:treenode text="2005" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/BusinessPlanConstruction105a.xls" />
</mytree:treenode>
</mytree:treenode>
<mytree:treenode text="Contract Compliance">
<mytree:treenode text="RCS's Notice to District of Project Assignment & Request for Bulletin Board Project"
Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Notification of compliance assignment.doc" />
<mytree:treenode text="Classifications in the New OJT Program" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Trainee Job Classif WITH EEO CATEGORIES.xls" />
</mytree:treenode>
<mytree:treenode text="DRB Procedures" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/DRB Website Procedures.doc" />
<mytree:treenode text="Matrix Performance Report" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Matrix _Sept 14, 2006_HP.doc" />
<mytree:treenode text="Plans Review" Target="fraMiddleTopFrame" NavigateUrl="">
<mytree:treenode text="Contract Time Pending (by Due Date)" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4%20hqconst/Contract%20Time%20Pending%20(By%20Date%20Due).pdf" />
<mytree:treenode text="Pending Plans Review (by Due Date)" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4%20hqconst/Plan%20Reviews_%20Pending%20(By%20Due%20Date).pdf" />
<mytree:treenode text="Supplemental Agreement Requirements (District IV)" Target="fraMiddleTopFrame"
NavigateUrl="./Downloads/D-4 SA Training version4rev.ppt" />
<mytree:treenode text="TCP Approval Pending" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4%20hqconst/TCP%20Approval%20Pending.pdf" />
</mytree:treenode>
<mytree:treenode text="Rail Pre-Construction Checklist" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Rail Pre-construction checklist revised 121404xls.xls" />
<mytree:treenode text="Railroad Pre-Construction Document" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Precon mtg r_road c_list.doc" />
</mytree:treenode>
<mytree:treenode text="Contract Compliance" Target="fraMiddleTopFrame" NavigateUrl="./ContractCompliance.aspx">
<mytree:treenode text="Contract Compliance Forms/Reports" Target="fraMiddleTopFrame" NavigateUrl="./ContComplianceLinkInfo.aspx" />
</mytree:treenode>
<mytree:treenode text="I-95 Mobility Website" target="_top" NavigateUrl="http://www.i95wpb.com/" />
<mytree:treenode text="Our Vision/Mission/Values" Target="fraMiddleTopFrame" NavigateUrl="./MissionVision.aspx" />
<mytree:treenode text="Progress Reports" Target="fraMiddleTopFrame" NavigateUrl="">
<mytree:treenode text="Broward" Target="_top" NavigateUrl="http://dotsd4hqweb/d4%20ftlauderdale/FLmpr.htm" />
<mytree:treenode text="Indian River" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/indian_river_county.htm" />
<mytree:treenode text="Martin" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/martin_county.htm" />
<mytree:treenode text="Palm Beach" Target="_top" NavigateUrl="\\dotsd4pbfs\shared\Construction\Mont hly Progress Reports\mprs.htm" />
<mytree:treenode text="St. Lucie" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/stlucie_county.htm" />
</mytree:treenode>
<mytree:treenode text="SiteManager" Target="fraMiddleTopFrame" NavigateUrl="http://www.dot.state.fl.us/construction/trnsport/2002_SM_Manual/2002%20NEW%20User%20Handbook.pdf" />
<mytree:treenode text="Training" Target="fraMiddleTopFrame" NavigateUrl="./ConstructionTraining.aspx" />
</mytree:treenode>
<mytree:treenode text="District Maintenance" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/d4%20maintenance/d4nethome.htm" />
<mytree:treenode text="District Materials Office" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/MatWeb-C/index.htm" />
<mytree:treenode text="Operations Centers">
<mytree:treenode text="Broward" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb/d4%20ftlauderdale/index.htm" />
<mytree:treenode text="Treasure Coast" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/FT_PIERCE/index.htm" />
<mytree:treenode text="Palm Beach" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/wpb/index.htm" />
</mytree:treenode>
<mytree:treenode text="Operations Training" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/operations%20training/index.htm" />
<mytree:treenode text="P.E. Trainee" Target="_top" NavigateUrl="http://dotsd4hqweb/d4%20PE-Trainee/" />
<mytree:treenode text="Contacts">
<mytree:treenode text="District IV Construction" target="fraMiddleTopFrame" NavigateUrl="./DistrictConstruction.aspx">
<mytree:treenode text="Director of Operations" target="fraMiddleTopFrame" NavigateUrl="./Director.aspx" />
<mytree:treenode text="Phone and Email List" target="fraMiddleTopFrame" NavigateUrl="./PhoneList.aspx" />
<mytree:treenode text="Training" Target="fraMiddleTopFrame" NavigateUrl="./ConstructionTraining.aspx" />
<mytree:treenode text="Contract Compliance" Target="fraMiddleTopFrame" NavigateUrl="./ContractCompliance.aspx" />
</mytree:treenode>
</mytree:treenode>
<mytree:treenode text="Links">
<mytree:treenode text="District IV Net" target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/" />
<mytree:treenode text="I-95 Mobility Website" target="_top" NavigateUrl="http://www.i95wpb.com/" />
<mytree:treenode text="INFONET" target="_top" NavigateUrl="http://infonet/" />
<mytree:treenode text="MyFlorida" target="_top" NavigateUrl="http://www.myflorida.com/" />
<mytree:treenode text="People First" target="_top" NavigateUrl="https://peoplefirst.myflorida.com/logon.htm" />
<mytree:treenode text="Project Suite" target="_top" NavigateUrl="http://dotsd4hqprodweb.dot.state.fl.us/TD_Main.asp" />
<mytree:treenode text="State Construction Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/construction/" />
<mytree:treenode text="State Maintenance Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/statemaintenanceoffice/" />
<mytree:treenode text="State Materials Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/statematerialsoffice/" />
</mytree:treenode>
</mytree:treeview>
Oct 30 '06 #1
0 1557

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: serge calderara | last post by:
dear all, Is there an easy way to bind a treeview control with an XML object as datasource? In a similar way as the dataset is doing, and build columns accroding to XML node, I could imagine a...
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...
3
by: Trond Hoiberg | last post by:
I have a lil problem i am struggling with. I have a folder LOGFILES that contains subfolder. Like this: MACHINE1 --DATE1 --DATE2 --DATE3 MACHINE2 --DATE1 --DATE2
3
by: christof | last post by:
I've got a really easy problem, please help me: There are two pages in one I'm creating a TreeView like that: TreeView dbTree = new TreeView(); TreeNode dbTreeRoot = new TreeNode("Root");...
0
by: Henry | last post by:
I am trying to create a TreeView control that works with an ADO Dataset DataTable or the new BindingSource stuff in .NET 2.0 to build a Treeview that is populated. This is what I came up with...
1
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...
4
by: Henry | last post by:
Does anybody have a real-world sample of buiding a treeview control using data from database tables? All the sample code I have found either builds the treeview manually or uses a file directory...
3
by: =?Utf-8?B?TGVzbGll?= | last post by:
Using Visual Studio 2005 SP1 I am attempting to dynamically load a treeview control. I create an XmlDataSource and then load the data source using XmlDataSource.Data. I Load my XML string into...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.