Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Reading child nodes of a treeview (http://www.velocityreviews.com/forums/t780104-reading-child-nodes-of-a-treeview.html)

David 08-12-2007 06:18 PM

Reading child nodes of a treeview
 
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



David 08-12-2007 07:19 PM

Re: Reading child nodes of a treeview
 
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" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message
news:%23R3J20Q3HHA.5796@TK2MSFTNGP05.phx.gbl...
> 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
>





All times are GMT. The time now is 04:19 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.