Hierarchical DataList/DataGrid

Discussion in 'ASP .Net' started by nicksertis@gmail.com, Apr 10, 2006.

  1. Guest

    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
    , Apr 10, 2006
    #1
    1. Advertising

  2. Guest

    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
    , Apr 12, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan C Douglas

    Edit Command in hierarchical datagrid ..

    Dan C Douglas, Aug 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    511
    Dan C Douglas
    Aug 14, 2003
  2. Nevyn Twyll
    Replies:
    8
    Views:
    1,847
  3. =?Utf-8?B?TWlrZQ==?=

    display hierarchical data in datagrid

    =?Utf-8?B?TWlrZQ==?=, Dec 7, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    1,186
    Nick Stansbury
    Dec 8, 2004
  4. Dan C Douglas

    Edit Command in hierarchical datagrid ..

    Dan C Douglas, Aug 14, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    172
    Dan C Douglas
    Aug 14, 2003
  5. nicolas

    Hierarchical and recursive nested datagrid

    nicolas, Sep 29, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    181
    Nicolas Chevet
    Sep 30, 2003
Loading...

Share This Page