开发者

How to bind data from DB to a treeview in silverlight?

Suppose I have a table in DB like:

Tab(id, parentid);

by EF, I can get the data collection as a tree like 开发者_开发问答IQueryable by wcf service. say the data like id parentid

1, nul
2, 1  
3, 1
4, 2
5, 2
6, 4
7, 4
8, 4
9, 1

Then I want to bind this data to a treeview, how to implement it?


This data will be ItemsSource for you TreeView control. This article answers for you - How to Display Hierarchical data

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜