Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Reading child nodes of a treeview

Reply
Thread Tools

Reading child nodes of a treeview

 
 
David
Guest
Posts: n/a
 
      08-12-2007
Hi all,

I am using .NET 1.1 and Microsoft.Web.UI.WebControls.TreeView

I am populating my treeview from a database and that is all working
perfectly. Basically, what I want to do is to select certain records in the
database to copy to another database (publish). For this, I have the
checkboxes on each node. (I can check a node and all child nodes will be
selected, to save time.)

On my page, once I have selected the detail to publish, I have a
"Publish..." button. However, when I click it, I cannot get the nodes that
are selected. I am not sure where to start...

I have tried starting at the root node, but there doesn't appear to be any
node.childnodes or similar in order to get the children of the current node.

Spent all day searching but struggling to find answers.

How do I do this?

As a side question... when I have the selected details working, I want to
just publish those rows. If anyone has any ideas on the best way to do this
(probably using the current dataset somehow), it would be very much
appreciated. (There will be some slight changes to the data, for example,
data related by ID field, the ID field value will naturally change, so child
data related ID value will have to change).

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


 
Reply With Quote
 
 
 
 
David
Guest
Posts: n/a
 
      08-12-2007
Doh!!!

No sooner I post this than I work out how to do it.

treenode.nodes is the same as a treenodecollection, which means that I can
call a function while reading all the nodes, then pass the treenode.nodes
into a function that expects the treenodecollection.

Now that I have that, I somehow need to manage the data side of it (my side
question).

Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"David" <> wrote in message
news:%...
> Hi all,
>
> I am using .NET 1.1 and Microsoft.Web.UI.WebControls.TreeView
>
> I am populating my treeview from a database and that is all working
> perfectly. Basically, what I want to do is to select certain records in
> the database to copy to another database (publish). For this, I have the
> checkboxes on each node. (I can check a node and all child nodes will be
> selected, to save time.)
>
> On my page, once I have selected the detail to publish, I have a
> "Publish..." button. However, when I click it, I cannot get the nodes that
> are selected. I am not sure where to start...
>
> I have tried starting at the root node, but there doesn't appear to be any
> node.childnodes or similar in order to get the children of the current
> node.
>
> Spent all day searching but struggling to find answers.
>
> How do I do this?
>
> As a side question... when I have the selected details working, I want to
> just publish those rows. If anyone has any ideas on the best way to do
> this (probably using the current dataset somehow), it would be very much
> appreciated. (There will be some slight changes to the data, for example,
> data related by ID field, the ID field value will naturally change, so
> child data related ID value will have to change).
>
> --
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to select particular Node and its child nodes in TreeView of ASP.Net 2005 ? Luqman ASP .Net 2 06-05-2007 07:36 PM
select nodes with child node A and child node B gplott@yahoo.com XML 1 11-01-2006 09:27 PM
Selecting Nodes Using Subtotal of Child Nodes renfrochris@hotmail.com XML 1 08-24-2006 12:30 AM
TreeView with child nodes bsg92056 ASP .Net Web Controls 0 07-19-2005 09:21 PM
TreeView not rendering nodes? Cacheing of a TreeView Per Salmi ASP .Net Web Controls 1 10-15-2003 01:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57