Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2387
Advanced DataBinding w/ columns
posted

I have a WinTree which I want to totally populate via DataBinding.  The root nodes are of one type and children nodes are of a totally different type.  On the root node, the code calls:

treeNode.Nodes.SetDataBinding(childDataSource, string.empty);

And the children are displayed showing the first property of the object in which the given node is bound. 

There should be two columns from the childDataSource displayed.  How does one go about setting up a column set for the children such that dataBinding knows which columns in the dataset to bind to?

When I try putting in a property name, which happens to be a property of a derived class, there are no children:

class base { public string name { get; set; } }

class derived : base { string details { get; set; } }

class CustomDataSet : BindingList<derived> {}

I want to show both the name and details under the root.  The root is of a different type not shows in this code

Sam

Parents Reply Children