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
45
self-referencing hierarchical table not displaying
posted

Hello,

I have a table with an AccountID column and a ParentID column.  There is a data relation, Children, that relates the columns.  Below is the xaml I have written to try and get it to work, but when I add the <igDP:Field Name="Children"  /> field, only the second FieldLayout is displayed, and the first FieldLayout disappears.  What do I need to change to get this to work?  Does the hierarchical stuff only work with multiple tables?

 

            <igDP:XamDataGrid.FieldLayouts>
                <igDP:FieldLayout>
                    <igDP:FieldLayout.Fields>
                        <igDP:Field Name="Name" />
                        <igDP:Field Name="Type" />
                        <igDP:UnboundField Name="Balance" DataType="system:Decimal"/>
                        <igDP:Field Name="Inactive" Visibility="Collapsed" />
                        <igDP:Field Name="Children"  />
                    </igDP:FieldLayout.Fields>
                </igDP:FieldLayout>
                <igDP:FieldLayout>
                    <igDP:FieldLayout.Fields>
                        <igDP:Field Name="Name" />
                        <igDP:Field Name="Description" />
                    </igDP:FieldLayout.Fields>
                </igDP:FieldLayout>

Parents
No Data
Reply
  • 95
    posted

    I have a similar issue... but a variation of it ... 

    Here is what I have:

    1. A self-referencing Table with Parent Child Relationship:
    2. TABLE: ParentId, AccountId, AccountName
    3. Accounts hierarchy can be as deep as 10 down... or infinite.....
    4. Have data available in DataSet or XML format both

    Here is what I want: Simple, but oh well don't get me started:

    1. I want a xamDataGrid to show proper hierarchy based on my model, hopeful not with too much of convoluted code in XAML or c#
    2. I DO NOT want to see headers anywhere in the xamDataGrid
    3. I want to see + or arrow buttons where the accounts have sub accounts and NOT where there aren't any more. The last node should not have any plus sign
    4. The only visible field is the account name, IDs are hidden or collapsed
    5. I want AccountId returned to me when I click the AccountName node
    6. And yes, it has to be a TreeView style ofcourse...

    Ok, show me the easiest and fastest way there....

    Thanks



     

Children