As the title suggests, I am binding a WebDataTree to an IEnumerable list at runtime. The IEnumerable has a list property (also an IEnumerable) and so on, which the WebDataTree picks up fine. However, the names of all nodes are represented as the fully qualified name of the class (e.g. Phoenix.DataNodes.ClienNode).
How can I tell the WebDataTree to bind to a specific property in the IEnumerable so that the text displayed is the underlying value of that property?
I seem to have resolved the first issue by applying a template to each node on the NodeBound event. However, I now have a new issue. After a postback, every node loses the previously bound DataItem.
Keeping in mind that I'm binding the data programmatically (as these are IEnumerable's and not datasets as all the examples seem to use), how can I ensure that all the nodes in the tree persist their DataItems after a postback, or alternatively, how can I create a binding source in the ASPX page that creates the children from an IEnumerable property in the parent?
Thanks,
Alex
Hello Alex,
Thank you for writing in our community.
I have created a basic sample for you to show you how to bind the WebDataTree to IEnumerable. Please take a look at it and let me know is that what are you trying to accomplish. Also, can you please provide me more information on your case scenario or send me a working sample so I can better assist you. Additionally here are some resources that you might find useful: