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
205
Elide DataRelation Names when Binding to DataSet
posted

Dear all,

As you know, when WinTree is bound to an ADO.NET DataTable that has multiple child tables, the immediate children of each root node represent the set of available child DataRelations.  To get at the actual child data you must therefore: 1) expand the root node, then 2) expand the relevant relation. 

In the vast majority of circumstances, this makes perfect sense.  However, the schema I'm working with defines a 1-1 relationship between the parent DataTable and its children.  Thus, expanding each 'DataRelation' child of the root node reveals only a single child row.

What I would like to do is to remove the root node's DataRelation children, and have it so that when the root node is expanded, its child records are visible immediately, without the need to expand a 'DataRelation' node first.  Is this possible?

 

Many thanks in advance

Dan

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Dan,

    There's no way the tree can do this. It has no way of knowing that each child list has only one record. And even if it did, there's no way the tree could combine multiple relationships into a single nodes collection.

    You would have to do this on the DataSource. Perhaps you could use an UltraDataSource as a sort've intermediary between the three and your real data source. Either by copying all of the data from your data source into an UltraDataSource with the structure you want. Or by using it in on-demand mode and responding to the events on the component.

Children
No Data