I have a master/child hierarchical data bound to the grid and I want to auto-expand the master records. I have set ExpandableFieldRecordExpansionMode to ExpandAlways but it seems to have no effect, the master record is still closed on init and I have to click '+' icon to open it. Do I misunderstand what this property is used for?
Here is my XAML:
<
ig:XamDataGrid x:Name="_dataGrid"
DataSource="{Binding}"
AssigningFieldLayoutToItem="XamDataGrid_AssigningFieldLayoutToItem"
InitializeRecord="_dataGrid_InitializeRecord"
GroupByAreaLocation="None">
<ig:XamDataGrid.FieldLayoutSettings>
<ig:FieldLayoutSettings AutoGenerateFields="False" />
</ig:XamDataGrid.FieldLayoutSettings>
<ig:XamDataGrid.FieldSettings>
<ig:FieldSettings ExpandableFieldRecordExpansionMode="ExpandAlways" />
</ig:XamDataGrid.FieldSettings>
<ig:XamDataGrid.FieldLayouts>
<ig:FieldLayout x:Name="_listLayout">
<ig:Field Name="BidList" FixedLocation="FixedToNearEdge" Width="*" />
<ig:Field Name="Entries"/>
</ig:FieldLayout>
<ig:FieldLayout x:Name="_enrtryLayout">
<ig:Field Name="Name" FixedLocation="FixedToNearEdge" />
<ig:Field Name="LastPrice" />
</ig:XamDataGrid.FieldLayouts>
</ig:XamDataGrid>
The ExpandableFieldRecordExpansionMode property is related to the ExpandableFieldRecordPresenter element, which hosts the nested records. To get a better idea of what these modes do, you can see the example in the XamFeatureBrowser - XamDataGrid - Layout and Behavior - ExpandableFieldRecord Display Modes
Thanks. So, what is the intended use for ExpandableFieldRecordExpansionMode?
Hello,
You can try handling the InitializeRecord event and set the IsExpanded property of the Record:
e.Record.IsExpanded = true;