473,320 Members | 1,945 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,320 software developers and data experts.

Binding TreeViews

Hi,

In ASP.NET 2.0, what's the best approach for binding a TreeView control
to data in SQL Server? Is it possible to write a "SELECT ... FOR XML"
type query that you can feed directly into the TreeView? It only seems
possible to bind to a static XML file, or a site map.

Maybe it's just a case of using some ADO.NET to trawl through the
database and add each node dynamically?

Thanks,
Chris

Apr 18 '06 #1
2 807
There is a free SQL Site Map Data Source control you can get from here
http://msdn.microsoft.com/msdnmag/is...02/WickedCode/

"Chris Fulstow" wrote:
Hi,

In ASP.NET 2.0, what's the best approach for binding a TreeView control
to data in SQL Server? Is it possible to write a "SELECT ... FOR XML"
type query that you can feed directly into the TreeView? It only seems
possible to bind to a static XML file, or a site map.

Maybe it's just a case of using some ADO.NET to trawl through the
database and add each node dynamically?

Thanks,
Chris

Apr 18 '06 #2
Great - looks just the job. Thanks

Apr 18 '06 #3

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

Similar topics

0
by: Gurudev | last post by:
Is it possible to create an explorer style drag and drop for treeviews in C# i.e. the selected node text appears and moves along with the cursor while dragging thanks in advance --...
3
by: sho_nuff | last post by:
Hello all, I want to create a List of TreeViews in either a ListView or ListBox component. The result would be a list object that for the first row has a tree like: com -foo
4
by: Michael C# | last post by:
I have a quick question, and was just wondering if anyone knew a good resource, article(s) or sample source code. I want to be able to connect the nodes of two treeviews graphically via lines. I...
1
by: emferrari | last post by:
Hi everybody I have two treeviews, one of them is only to receive items dragged from the treeview1. I want to know how to drag a full node information to the treeview2. I know how to do that...
3
by: Woody Splawn | last post by:
I have been experimenting with Auto Slides and TreeViews and find them most usefull in Winforms. I know how to create a Treview and have it, for example, slide out from the left of my Winform but...
2
by: Mullin Yu | last post by:
hi, i want to know a better way to build a xml tree at .net, especially vb.net. yes, i can make by string or dom. but, is there any faster way like XML Java Binding or something else? ...
1
by: jotaefe | last post by:
Hi there, Anybody knows if it is possible to highlight nodes on a treeview (over) on a drag and drop operation from a different treeview? The two treeviews are in the same Windows form. Your...
3
Raventara
by: Raventara | last post by:
Hi-a all, I have two treeviews on a form (VB.NET) and one of them contains words, and the other commands. Each word has a command assigned to it. I chose to show this in a treeview as certain words...
0
by: track | last post by:
I have two treeviews say TreeviewA and TreeviewB on windows form in .Net. I want to transfer node from TreeviewA to TreeviewB based on selected node under TreeviewB. But problem is when I select...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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)...
0
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...
0
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...

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.