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
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.
Hi Alex,
what you said was right but for my scenario
i dont understand how it works.
i have attached an image of my grid.
My Scenario is Table B has 5 Child Tables and
in the xaml i have made those 5 tables as fields in my table B Fieldlayout.
Even though if for a B record there no related record with all child tables it shows the expander for all the 5 child tables.
I wanted to disable the field loyouts or the expander for the child table layout which does not contain data each time.
I think if you see the image you could understand the scenario.