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
60
Setting up colimns for a data bound UltraTree
posted

I have a UltraTree instance bound to a DataSet, the tree suppose to display a data from 3 related tables, so I expect to have 3 node levels. When I let the control to autogenerate columns, all the records are displayed, but there are columns user do not need to see. If I define the columns in the code, only the root level data displayed. Since all the 3 tables has the same structure, I've tried both the ViewStyle.Grid and ViewStyle.OutlookExpress styles, but with no sucess.

So my questiuon is how do I define columns for the child levels?

 Thanks.

  • 469350
    Verified Answer
    Offline posted

    Hi,

        When you define the ColumnSets yourself, you have to add a column to represent the child band. A child band is really just a special sort of column. So if you take a look at the ColumnSets that are automatically generated by the tree and examine the colmuns in the root level, you will see a column whose key is the same as the name of the child band and the IsChaptered property on this column is true to indicate that it's a child band. 

        So there are a couple of ways you can handle this. One way would be to add the chaptered columns when you create your ColumnSets and set IsChaptered to true on them.

        The other way would be to let the tree automatically generate the column sets and then handle the ColumnSetGenerated event of the tree and remove the columns you don't want.