Treeview Databinding DataSet

Hi,

I want to databind a WPF treeview to a dataset that has a single table that implements a "tree like" structure with a n level parent child relation.

Is there a possibility to bind the dataset to the treeview in this particular case. I've found an example with two tables for n=2 and of course with 3 tables for n=3, but this is not a solutionSad

Thank you,

George B

[504 byte] By [ixman] at [2008-1-5]
# 1

Hello, I think you can try to use LINQ to DataSet to convert the DataSet to your own object. Then you can use standard ObjectDataProvider. It’s sure easier to work with objects then to work with relational data, especially if the data has a hierarchical structure. But be aware, LINQ is still a beta technology.

Yi-LunLuo-MSFT at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2

Hi,

Thank you for your response, I’ll try this solution too....

Actually I found a "workaround" here http://www.beacosta.com/2006/03/how-do-i-bind-to-adonet.html for a single table... seems more like a hack to me, but it works...

Thank you,

George B

ixman at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified