This is a migrated thread and some comments may be shown as answers.

TreeView - decision - data binding?

1 Answer 84 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
mfrimu
Top achievements
Rank 1
mfrimu asked on 09 Feb 2009, 05:49 PM
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



1 Answer, 1 is accepted

Sort by
0
mfrimu
Top achievements
Rank 1
answered on 10 Feb 2009, 12:47 PM
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

Tags
TreeView
Asked by
mfrimu
Top achievements
Rank 1
Answers by
mfrimu
Top achievements
Rank 1
Share this question
or