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
35
UltraTree bound to 4 hierarchical DataTables. Unexpected column order
posted

UltraTree bound to 4 hierarhical DataTables with relationships.  All columns visible for clarity. I have not altered col.LayoutInfo.OriginX or anything else. 1st table has 6 columns.  Linked are images of typed DataSet and 2 ultraTree1.ViewStyles (default, and OutlookExpress) on Pinterest (may need to download to see full size):  https://pin.it/ac3ykt2ngnxau2

A. ViewStyle = default (all columns on all rows are in the same order as the DataTable

B. ViewStyle = OutlookExpress (some discrepancies in column order)

Row[1].Col[0] =  66 but should be 1070

Row[2].Col[1] = "CD33" but should be "10010"

Column order for all DataTable as follows (deployed version will hide column 0 and 3,4,5,6,7, etc.)

[0] = primary key 

[1] = displayed value (string).  (should be = column.ColumnSet.ExpansionIndicatorColumn.Key)

[2] = status (string)

Almost everything displays as expected except the two items mentioned under ViewStyle = OutlookExpress

('m not understanding what determines the default column order here or why they changed between the default ViewStyle and the OutlookExpress ViewStyle? It's clearly not the order in the DataTable.

thanks, Mark

Parents
No Data
Reply
  • 18204
    Verified Answer
    Offline posted

    Hi Mark,

    Thank you for posting in our forums!

    One of our developers provided the following information on what is happening here.  Please see his comments below:

    OutlookExpress is basically for homogenous data where every band has the same columns. That’s not the case here, so it’s a little odd to use OutlookExpress style for this data. But I can see that the data is sort’ve the same in each band except for the parent key field.

    So what’s happening here is that the root band has a column called “Campaign_ID” and the child band has a column with the same name. The tree is, quite naturally, assuming that these are the same and should be linked up since they have the same name/key.

    Since the columns don’t really match up, the customer will have to manually link the columns in the child bands to the correct column in the root band. At least for the cases where the names are not already the same.  You do this via the MapToColumn property on the column. On the child band column, you specify the key of the column in the root band that determines where the child column will display.

    But there is also some weirdness here because the number of columns doesn’t match up. And I don’t know what the Experiment_Type file should map to in the root band. So OutlookExpress ViewStyle really doesn’t make a lot of sense for this data structure.

    I attached a sample here that shows how to do the mapping.

    0247.WindowsFormsApplication53.zip

    Please let me know if you need further assistance and I will be glad to help.

Children