473,320 Members | 1,862 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.

Treeviews

JJ
Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ
Nov 15 '05 #1
5 1172
JJ,

There is no easy way. There is no databinding model set for the
treeview. You will have to iterate through the items in your dataset and
set up the treeview accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JJ" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...
Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ

Nov 15 '05 #2
If the dataset is generated by SQL Server, you could write a stored
procedure to return the tree structure as XML and write a few simple lines
of code to recursively step through it.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uI**************@TK2MSFTNGP09.phx.gbl...
JJ,

There is no easy way. There is no databinding model set for the
treeview. You will have to iterate through the items in your dataset and
set up the treeview accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JJ" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...
Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ


Nov 15 '05 #3
JJ
Don't you guys find this amazing? Here 75% of the data
that we bring back from databases needs to put in some
sort of Hierarchial representation and their is nothing
to allow us to easily do this! Mind boggeling.

Thanks,
JJ
-----Original Message-----
If the dataset is generated by SQL Server, you could write a storedprocedure to return the tree structure as XML and write a few simple linesof code to recursively step through it.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote inmessage news:uI**************@TK2MSFTNGP09.phx.gbl...
JJ,

There is no easy way. There is no databinding model set for the treeview. You will have to iterate through the items in your dataset and set up the treeview accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JJ" <an*******@discussions.microsoft.com> wrote in message news:0b****************************@phx.gbl...
> Ok Guys,
>
> I have a dataset and I need to make a treeview out of > it. I want checkboxs and icons to show on the tree. What > is the easiest way to get this dataset setup for a parent- > Child treeview?
>
> Thanks,
>
> JJ


.

Nov 15 '05 #4
JJ

Ed,

How does bringing back the dataset as xml help me?

Thanks,

JJ

-----Original Message-----
If the dataset is generated by SQL Server, you could write a storedprocedure to return the tree structure as XML and write a few simple linesof code to recursively step through it.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote inmessage news:uI**************@TK2MSFTNGP09.phx.gbl...
JJ,

There is no easy way. There is no databinding model set for the treeview. You will have to iterate through the items in your dataset and set up the treeview accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JJ" <an*******@discussions.microsoft.com> wrote in message news:0b****************************@phx.gbl...
> Ok Guys,
>
> I have a dataset and I need to make a treeview out of > it. I want checkboxs and icons to show on the tree. What > is the easiest way to get this dataset setup for a parent- > Child treeview?
>
> Thanks,
>
> JJ


.

Nov 15 '05 #5
It means the code for populating the treeview is very short and a lot of the
processing is offloaded from the client to the SQL Server. As XML is a
hierarchical tree, it's a very natural way to populate a treeview.

You will need to investigate how to use the FOR XML EXPLICIT command in
T-SQL.
"JJ" <an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...

Ed,

How does bringing back the dataset as xml help me?

Thanks,

JJ

-----Original Message-----
If the dataset is generated by SQL Server, you could

write a stored
procedure to return the tree structure as XML and write

a few simple lines
of code to recursively step through it.

"Nicholas Paldino [.NET/C# MVP]"

<mv*@spam.guard.caspershouse.com> wrote in
message news:uI**************@TK2MSFTNGP09.phx.gbl...
JJ,

There is no easy way. There is no databinding model set for the treeview. You will have to iterate through the items in your dataset and set up the treeview accordingly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JJ" <an*******@discussions.microsoft.com> wrote in message news:0b****************************@phx.gbl...
> Ok Guys,
>
> I have a dataset and I need to make a treeview out of > it. I want checkboxs and icons to show on the tree. What > is the easiest way to get this dataset setup for a parent- > Child treeview?
>
> Thanks,
>
> JJ

.

Nov 15 '05 #6

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

Similar topics

0
by: j_mckitrick | last post by:
I'm using a basic MVC TreeView in GTK, but this isn't a GTK question. I have a set of objects and show their properties in a TreeView. I TreeView has a ListStore which can be modified, and the...
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...
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...
6
by: SalimZaabi | last post by:
How do I contruct a series of treeViews to display a folder with subfolders and files ?? I tried but all my tries were stuck on the second subtreeView!! how to keep the treeView going whenever...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: 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.