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.
精彩评论