Hello,
I have a grid with nested records and I would like to display the expansion indicator only if there is subrecords. So I used the following option : ExpansionIndicatorDisplayMode="CheckOnDisplay".
Problem : when I set the indicator, headers are gone. If I do not so, headers are well displayed.
with ExpansionIndicatorDisplayMode="CheckOnDisplay" :
without the option :
Do you any idea to slove the problem?
Thank you
Guillaume
Guillaume,
Thank you for the modified project. I was able to reproduce this. I will create a support case on your behalf so that we can continued this discussion there.
Currently, I'm using the release v10.1.20101.1000. You will find a version modified so as to reproduce the trouble.
I have changed the xaml file to have the option on both the master and nested layouts. I have also modified the "lazy loading" to have an additional preloaded level.
Sincerely
I have this working correctly on my end. I am testing this with the latest service release for 9.2 (9.2.20092.2094). Please let me know if you can reproduce it with the attached project. If not, can you modify it so that it becomes reproducible.
Thanks!
Here is the xaml code I uses. It is more or less the same than the one used to display a data grid as a tree
<igDP:XamDataGrid Name="xamDtaGridPlanFi" GroupByAreaLocation="None" DataSource="{Binding PlanFi.Nodes}" FieldChooserOpening="xamDtaGridPlanFi_FieldChooserOpening">
<igDP:XamDataGrid.Resources>
<converters:XamConverter x:Key="conv"/>
<Style x:Key="{x:Type igDP:FieldChooser}" TargetType="{x:Type igDP:FieldChooser}" BasedOn="{StaticResource {x:Type igDP:FieldChooser}}">
<Setter Property="FieldDisplayOrder" Value="SameAsDataPresenter" />
</Style>
<Style TargetType="{x:Type igDP:RecordPresenter}">
<Setter Property="IsExpanded" Value="True"/>
<Style TargetType="{x:Type igDP:DataRecordPresenter}" x:Key="nestedEXPStyle">
<Setter Property="RenderTransform">
<Setter.Value>
<TranslateTransform X="{Binding Path=NestingDepth, Converter={StaticResource conv}}" Y="0"/>
</Setter.Value>
</Setter>
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="nestedCVPStyle">
<Setter Property="Margin" Value="{Binding Path=NestingDepth, ConverterParameter=cvp, Converter={StaticResource conv}}" />
<Style TargetType="{x:Type igDP:LabelPresenter}">
<EventSetter Event="SizeChanged" Handler="OnLabelPresenterSizeChanged" />
</igDP:XamDataGrid.Resources>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout Key="master">
<igDP:Field Name="Label">
<igDP:Field.Settings>
<igDP:FieldSettings CellWidth="260" />
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="Qty"/>
<igDP:Field Name="Value"/>
<igDP:Field Name="Nodes"/>
<igDP:FieldLayout.Settings>
<igDP:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" HeaderPlacement="OnTopOnly" HeaderPlacementInGroupBy="OnTopOnly"/>
</igDP:FieldLayout.Settings>
</igDP:FieldLayout>
<igDP:FieldLayout Key="nested">
<igDP:FieldSettings CellValuePresenterStyle="{StaticResource nestedCVPStyle}"/>
<igDP:FieldLayout.FieldSettings>
<igDP:FieldSettings AllowResize="False"/>
</igDP:FieldLayout.FieldSettings>
<igDP:FieldLayoutSettings ExpansionIndicatorDisplayMode="CheckOnDisplay" HighlightAlternateRecords="True" DataRecordPresenterStyle="{StaticResource nestedEXPStyle}" LabelLocation="Hidden"/>
</igDP:XamDataGrid.FieldLayouts>
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AutoGenerateFields="False"/>
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings AllowEdit="False" CellClickAction="SelectRecord"/>
</igDP:XamDataGrid.FieldSettings>
</igDP:XamDataGrid>
Hello Guillaume,
This looks like a styling issue as from what I can see from the screenshots, the LabelPresenters are gone, however the header record is there. How are you setting the ExpansionIndicatorDisplayMode property? Are you using some style?