Hierarchical DataList/DataGrid

N

nicksertis

Hi All,

I'm working on a project which has thrown up an issue that I'd like
some advice on. It basically calls for me to display a tree like
structure, but for each node to be editable (ie each row will have a
number of fields that will become editable when selected). The tree has
to be collapsable too. This is all on .NET version 1.0.

I was thinking that I could use a datalist to display all first level
(in the tree) items, and then when one is clicked I would insert rows
into the list that represented all items under that tree node. If
another top level item was clicked, I would first remove/collapse the
second level items from the list and then insert the second level items
for the newly clicked item.

Does any of this make sense? The main hurdle in this solution is
inserting rows into a datalist or datagrid, which i'm not sure is even
possible? The reason for trying to do this rather then reload the whole
tree is to save accessing the DB and reloading the tree each time the
page loads. Is there a clever way to store a dataset in memory (session
var etc) if rebuilding the tree each time is necessary?

Let me know if any of this is unclear or if you need more info.

Many Thanks,
Nick
 
N

nicksertis

Hi,

For anyone interested, I ended up using a single DataList and a
recursive function to build the tree each time the page is loaded.
Since only 1 item at each level can be expanded, the amount of data
retrieved from the DB is minimal.

If anyone wants more info, just send me and email and I'll try to help.

Thanks,
Nick
 

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,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top