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
275
Is there a way to choose which Relation to use in a Hierarchical grid?
posted

I want to create a Hierarchical grid using data coming from a dataset.  The parent table actually has two child tables, and I would like my grid to show the parent and the second child, not the first.  I don't want to permanently remove the relation between the parent and the first child, since other parts of the application use this.  Is there a way to choose which DataRelation a Hierarchical grid will look at?

  • 100
    Verified Answer
    posted

    In the bands section, have only the Parent table and the second child table.

    Example code

    <bands>
            <igtbl:UltraGridBand BaseTableName="ParentTable" Expandable="Yes"  RowAlternateStyling="True">
                <COLUMNS>
                <igtbl:UltraGridColumn Type="Custom" IsBound="true"  BaseColumnName="ParentName"  >
                </igtbl:UltraGridColumn>

    <!-- List out all the columns that needs to be displayed from the Parent table --!>

                </COLUMNS>

           </igtbl:UltraGridBand>
           
            <igtbl:UltraGridBand BaseTableName="SecondChildTable" Expandable="Yes" >
                <COLUMNS>
                <igtbl:UltraGridColumn Type="Custom" IsBound="true"  BaseColumnName="SecondChildName"  >
                </igtbl:UltraGridColumn>

    <!-- List out all the columns that needs to be displayed from the second child table --!>

                </COLUMNS>

           </igtbl:UltraGridBand>