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
560
Different FieldLayoutSettings for child grids.
posted

I have a small 3 level hierarchical grid.  I'd like to set the FieldLayoutSettings differently for each child level, setting the LabelLocation="Hidden" for the child only.  Right now, all 3 level of display uses the same FieldLayoutSettings.  I'd like to "apply" a FieldLayoutSettings to a specific FieldLayout.  How do I do this?

Here's my xaml:

     <igDP:XamDataGrid DataSource="{Binding Model}" >

            <igDP:XamDataGrid.FieldLayoutSettings>

                <igDP:FieldLayoutSettings AutoGenerateFields="False" LabelLocation="Hidden" />

            </igDP:XamDataGrid.FieldLayoutSettings>

            <igDP:XamDataGrid.FieldLayouts>

                <!-- FieldLayout for Level 1 -->

                <igDP:FieldLayout>                    

                    <igDP:FieldLayout.Fields>

                        <igDP:Field Name="Status"  />                        

                        <igDP:Field Name="ObservationCode" />                        

                        <igDP:Field Name="Comment" Width="*"/>                        

 

                    </igDP:FieldLayout.Fields>

                </igDP:FieldLayout>

                <!-- FieldLayout for level 2 -->

                <igDP:FieldLayout>

                    <igDP:FieldLayout.Fields>

                        <igDP:Field Name="Sites" />                        

                        <igDP:Field Name="Status"  />

                        <igDP:Field Name="Description" Width="*"/>

                    </igDP:FieldLayout.Fields>

                </igDP:FieldLayout>

                <!-- FieldLayout for level 3-->

               <igDP:FieldLayout>

                    <igDP:FieldLayout.Fields>                        

                        <igDP:Field Name="Status" />                        

                        <igDP:Field Name="Description"  Width="*"/>

                    </igDP:FieldLayout.Fields>

                </igDP:FieldLayout> 

            </igDP:XamDataGrid.FieldLayouts>

        </igDP:XamDataGrid>

  • 69686
    Verified Answer
    posted

    Hello,

    Modifying the FieldSettings of the XamDataGrid will set these settings for all of the field layouts - globally.

    What you need to do is modify the Settings of the FieldLayout, which will result in different field layout settings per field layout. LIke this:

    <igDP:XamDataGrid.FieldLayouts>

                    <igDP:FieldLayout>

                        <igDP:FieldLayout.Settings>

                            <igDP:FieldLayoutSettings />

                        </igDP:FieldLayout.Settings>

                    </igDP:FieldLayout>

                    <igDP:FieldLayout>

                        <igDP:FieldLayout.Settings>

                            <igDP:FieldLayoutSettings />

                        </igDP:FieldLayout.Settings>

                    </igDP:FieldLayout>

                </igDP:XamDataGrid.FieldLayouts>

    Hope this helps.