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

table as node in a treeview control

Hello, I am developing to a simple application Web with asp.net and c #, and
now I am obstructed because I need to show in the page a control treeview
but for which each node is gridview or some table that can I create in a
dinamic way because the number of columns is variable... somebody has had
some similar problem or it can give me an idea of like doing this?, I am
something inexperienced in this platform.
Greetings and thanks for your tiem and help
May 28 '06 #1
3 9069
If I understand, you want the treeview nodes to come from a table at
runtime?

foreach (theDataSet.dataRow curRow in theDataSet.theTable)
{
treeView1.Nodes.Add(curRow.ColumnValue, curType.Description);
}

You would simple make it recursive to build out the tree structure
based on child rows.

May 28 '06 #2
Jason, thanks for answering me, but , no...that isn't...i need some like
this (the data for each new node showed in the tree must be loaded from the
database because the full tree is very very big and slow to construct):

| January | February | March
--------------|----------|-----------|-----------
- Root
+ Node1 | $500 | $623 | $1023
- Node 2 | $560 | $123 | $623
+Node3 | $100 | $223 | $3113

i try to link the tree view with a gridview but it appears to be
impossible...because when the tree node is collapsed the row in the grid
doesn't dissapear, and I think that if the node of the tree its by self a
table it can be usable..
Thanks
<ja***@razack.net> escribió en el mensaje
news:11**********************@i40g2000cwc.googlegr oups.com...
If I understand, you want the treeview nodes to come from a table at
runtime?

foreach (theDataSet.dataRow curRow in theDataSet.theTable)
{
treeView1.Nodes.Add(curRow.ColumnValue, curType.Description);
}

You would simple make it recursive to build out the tree structure
based on child rows.

May 29 '06 #3
Perhaps a bit closer to the right direction. Just starting out in .net
myself, haven't tried this.

http://msdn.microsoft.com/msdnmag/is.../08/DataGrids/

Sergio A. wrote:
Jason, thanks for answering me, but , no...that isn't...i need some like
this (the data for each new node showed in the tree must be loaded from the
database because the full tree is very very big and slow to construct):

| January | February | March
--------------|----------|-----------|-----------
- Root
+ Node1 | $500 | $623 | $1023
- Node 2 | $560 | $123 | $623
+Node3 | $100 | $223 | $3113

i try to link the tree view with a gridview but it appears to be
impossible...because when the tree node is collapsed the row in the grid
doesn't dissapear, and I think that if the node of the tree its by self a
table it can be usable..
Thanks
<ja***@razack.net> escribió en el mensaje
news:11**********************@i40g2000cwc.googlegr oups.com...
If I understand, you want the treeview nodes to come from a table at
runtime?

foreach (theDataSet.dataRow curRow in theDataSet.theTable)
{
treeView1.Nodes.Add(curRow.ColumnValue, curType.Description);
}

You would simple make it recursive to build out the tree structure
based on child rows.


Jun 5 '06 #4

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

Similar topics

2
by: Srinivasa Raghavan | last post by:
Hi I am using ASP Tree View Control to display data in hiearchy fashion.I am having a checkbox next to the TreeView Node.When user checks or unchecks the nodes and click a button i am putting...
1
by: Srinivasa Raghavan | last post by:
Hi All, I have some doubts on the Treeview control and Form Authentication 1) will Form Authentication work if cookies are disabled. 2) I have problem in the following code (TreeView...
2
by: Stephen | last post by:
In asp.net 1.1, the IE treeview web control has a property called "SelectExpands" that, when set to true, expands a node when a user clicks the node text. I can't seem to replicate this in the...
2
by: Ernest Cook | last post by:
Does anyone have any real world experience using the .Net version of the treeview control? If so, Can you recommend any good documentation sources for learning more about it. i.e. Methods, etc. ...
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...
4
by: praveen | last post by:
I have a form with treeview control loaded from xml document,text box, two buttons named "Find" and "FindNext" and my treeview which looks like below. Details |__ policy status |__ created by...
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...
7
by: Ryan | last post by:
OK, here's my setup. I have a treeview control that is populated with records from a Product table, and it allows "checking". This is used for my automatic notification system. Say a particular...
1
by: Woof | last post by:
Hi, I'm populating the nodes of a Tree View control via an SQL database, with the lowest child nodes (leaves from now on) Text field being set to a lengthy set of HTML. The outcome is a...
3
by: dutsnekcirf | last post by:
I have a treeview control on a custom task pane in Excel. I've enable the ability to use Drag & Drop (by following this how-to) on the treeview to change the order of the nodes. The problem though...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.