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
  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I can say that every FieldLayout has FieldSettings and FieldLayoutSettings properties where you can set Styles, which will be used in that particular FieldLayout only. Here it is shown how to add different DataRecordPresenter Styles:

     

    http://community.infragistics.com/forums/p/56753/290614.aspx

     

    Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

Reply Children