Hi,
Your code is correct. The XML file should be "Checked" instead of "1". You can try to set the TreeView's XmlFile property directly and see if it works for you. If it does, then check if you have set the XmlDataSource's XPath property. Binding to XmlFile and XmlDataSource are almost identical, except for binding to XmlFile skips the root, while XmlDataSource by default starts from the root.
Consider the following XML file:
Code: XML
<root title="root" checkstate="Unchecked">
<node title="child 1" checkstate="Checked" />
<node title="child 2" checkstate="Checked" />
</root>
If you do not set XmlDataSource's XPath property, you will get a single top level tree node "root" with two child nodes "child 1" and "child 2". However if you set XPath property to "/root/*", you will get a two top level tree nodes "child 1" and "child 2".
Please let us know if this resolves the issue.
Thanks!