开发者

How to display XML into a tree view?

开发者 https://www.devze.com 2023-01-19 23:33 出处:网络
I have a variable of XDocument, and I want to display its structure in a TreeView. I tried 开发者_Python百科TreeView1.DataSource = doc;

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

精彩评论

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

关注公众号