开发者

How to display XML into a tree view?

I have a variable of XDocument, and I want to display its structure in a TreeView. I tried

开发者_Python百科TreeView1.DataSource = doc;

but I got this error

HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable.


Use XmlDataSource as data source.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜