Reading child nodes of a treeview

D

David

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
 
D

David

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top