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
565
How can I style a nested grid differently from parent?
posted

When using nested FieldLayouts inside a XamDataGrid, is it possible to use different styling for the parent layout and the nested layout?

Given the structure of the xaml, I'm not sure how I'd accomplish this.  The xaml structure of my window is below.

Can I style the two FieldLayouts?  The Fields?  A snippet of example code would be really helpful.

 

<igDP:XamDataGrid Name="grid" Style="{StaticResource DefaultGrid}">

        <igDP:XamDataGrid.FieldLayouts>

 

                <igDP:FieldLayout Key="myParentRow">

                        <igDP:FieldLayout.Fields>

                                <igDP:Field Name="Name"/>

                                <igDP:Field Name="DetailRows" Visibility="Hidden"/>

                        </igDP:FieldLayout.Fields>

                </igDP:FieldLayout>

 

                <!-- Can I style this sub-grid differently than myParentRow above? -->

                <igDP:FieldLayout ParentFieldLayoutKey="myParentRow">

                        <igDP:FieldLayout.Fields>

                                <igDP:Field Name="Foo"/>

                                <igDP:Field Name="Bar"/>

                        </igDP:FieldLayout.Fields>

                </igDP:FieldLayout>

 

        </igDP:XamDataGrid.FieldLayouts>

</igDP:XamDataGrid>

 

Parents Reply Children
No Data