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
225
Limiting Expansion Levels
posted

Is there any way to keep an expansion indicator from showing up if the child records are not ones the user is supposed to see?  I added a cross reference table and XamDataCarousel including it in the hierarchy because of the Foreign Key relationship I set up between it and a table already in the hierarchy.

I just want two levels in this XamDataCarousel, the parent groups and the child records associated with each group.

Parents
No Data
Reply
  • 8576
    Offline posted

    Hi Mark -

    Yes - you can achieve this by creating a FieldLayout that hides the Field that represent the child level you want to hide.  For example:

    <igDP:XamDataCarousel x:Name="myDataCarousel"></igDP:XamDataCarousel>

    <igDP:XamDataCarousel.FieldLayouts>

    <igDP:FieldLayout>

    <igDP:FieldLayout.Fields>

    <igDP:Field Name="ChildDataField" Visibility="Collapsed"/>

    </igDP:FieldLayout.Fields>

    </igDP:FieldLayout>

    </igDP:XamDataCarousel.FieldLayouts>

    </igDP:XamDataCarousel>

     

    Note that the FieldLayout.Settings.AutoGenerateFields proeprty defaults to true by default and causes Field objects to be created and added to the FieldLayout.Fields collection for all fields discovered in the data.  With this in mind, instead of the approach shown in the sample code above where we let the control generate all the Fields and then manually hid the Field we didn't want, we could have taken the reverse approach and set AutoGenerateFields to false and then added Field objects just for the Fields we want to be included.

    Joe Modica 

     

     

Children