TreeView - decision - data binding?

2 posts, 0 answers
  1. mfrimu
    mfrimu avatar
    6 posts
    Member since:
    Jan 2007

    Posted 09 Feb 2009 Link to this post

    Hello,

    Looking at all the available methods of data binding and code examples i'm having a hard time deciding on how to approach a relatively simple design.

    1)
    I need to populate a TreeView with data, possibly up to 500 nodes, maybe on demand. I'm using self referencing hierarchical data using ItemID and ParentID. I would like to be able to drag & drop nodes, and save the changes to the database.

    2)
    I would also like (on another page) to have 2 treeviews populated by separate queries. I would like to drag & drop from one tree to the other (one direction only) single nodes or entire branches. I would like to save the newly edited tree to the database.

    Which databinding methods shoudl I use? Should I use a LinqDataSource, manually populate a dataset from LINQ or something else? I guess I would update changes to the database as they are made. I'm thinking of using a floating SortOrder field in the database. Which code samples should I look at ?

    Your advice would be greatly appreciated, as I don't want to start in the wrong direction.

    Thanks,

    Michael



  2. mfrimu
    mfrimu avatar
    6 posts
    Member since:
    Jan 2007

    Posted 10 Feb 2009 Link to this post

    Hello,

    Just thinking, would storing the tree data in an XML data type on the MS SQL 2008 be an option? Even if I have some 200-500 nodes?

    Would I have to load the the whole XML in the TreeView or could I load just branches on demand as they are expanded?

    Thanks,

    Mihai

Back to Top