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
655
Enable or disable the field layouts for the child layouts in Parent - to - child relationship
posted

HI All,

I have question

For  Example

if i have 4 tables A,B,C,D

A is the parent to B.

C and D are the childs of B

how can i enable or disable the the fields layouts for the C and D depending on the count of the data or using the some field values of the data in the XamDatagrid (Parent to child relationship)?

Thanks

Prakash

  • 69686
    posted

    Hello Prakash,

    First thing that comes up in my mind is to handle the RecordExpanding event and check the fieldlayout and other conditions that you might have and cancel it if needed.

    The other thing is control the ExpansionIndicatorDisplayMode of the fieldlayout in the FieldLayoutInitializing event:

    For example:

    void xamDataGrid1_FieldLayoutInitializing(object sender, Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializingEventArgs e)

            {

                if (xamDataGrid1.FieldLayouts.Count > 1)

                    e.FieldLayout.Settings.ExpansionIndicatorDisplayMode = ExpansionIndicatorDisplayMode.Never;

            }

    Hope this helps.