Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > How to save a TreeView ?

Reply
Thread Tools

How to save a TreeView ?

 
 
Polaris
Guest
Posts: n/a
 
      06-04-2007
Hi Experts:



I'm using ASP.NET 2.0. I'm using a TreeView control with a design-time
configured XmlDataSource (an XML file). I use the TreeView control as a
"message board" with each node representing a message. I noticed that the
TreeView loads alright from the XML file but did not save anything. I call
the TreeView.Save() for each new node added into the TreeView. What I'm
missing here?



Thanks in advance!

Polaris




 
Reply With Quote
 
 
 
 
PlatinumBay
Guest
Posts: n/a
 
      06-05-2007
Polaris,

I don't see a Save on either the TreeView or TreeNode controls. I do not
believe that the default TreeView has this functionality.

The XmlDataSource object does have a Save method, however. I would suggest
that when a TreeNode is added, removed or changed, that you capture those
events and update the XmlDataSource accordingly. You may wish to rebind the
control as well after making changes.

This article lists some code for the TreeView SelectedNodeChanged event:
http://msdn2.microsoft.com/en-us/lib...ve(VS.80).aspx

Hope this helps,


Steve



"Polaris" <> wrote in message
news:...
> Hi Experts:
>
>
>
> I'm using ASP.NET 2.0. I'm using a TreeView control with a design-time
> configured XmlDataSource (an XML file). I use the TreeView control as a
> "message board" with each node representing a message. I noticed that the
> TreeView loads alright from the XML file but did not save anything. I call
> the TreeView.Save() for each new node added into the TreeView. What I'm
> missing here?
>
>
>
> Thanks in advance!
>
> Polaris
>
>
>
>



 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
how to access the Page from a TreeNode (treeview 's element) : addinga context menu to a treeview abargaddon ASP .Net Building Controls 0 01-17-2008 11:05 AM
ASP.NET 2.0 TreeView - Programatically Selecting A TreeView Node =?Utf-8?B?VHltYm93?= ASP .Net 2 01-10-2006 03:51 AM
Issue with a custom TreeView derived from the TreeView control Ionutz ASP .Net Web Controls 2 10-23-2005 03:23 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