Hi,
We've got a grid with two FieldLayout, the second being a children to the first one.
<DataPresenter:FieldLayout Key="Children" ParentFieldLayoutKey="DefaultLayout" ParentFieldName="Children">
Our bound objects have an IEnumerable property named Children.
The problem happens when the Children collection is null or empty. We assign the DataSource, then we see the rows for an instant and they disappear. By using Snoop we're able to confirm the DataSource is still there with the parent rows.
Has anyone seen this before? We're using Infragistics WPF4 v 11.1.20111.2193
Thanks.
Ok, it also does happen if there are child rows.
Please see below the grid XAML.
<DataPresenter:XamDataGrid
x:Name="_positionsGrid"
Style="{StaticResource DefaultInfragisticsGridStyle}"
>
<DataPresenter:XamDataGrid.Resources>
<Style TargetType="{x:Type DataPresenter:LabelPresenter}" BasedOn="{StaticResource GridLabelPresenter}"/>
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource NuclearScrollBar}"/>
<Style TargetType="{x:Type DataPresenter:HeaderPrefixArea}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataPresenter:HeaderPrefixArea}">
<DockPanel Margin="0,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" LastChildFill="True">
<Views:BlotterSettingsView/>
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataPresenter:XamDataGrid.Resources>
<DataPresenter:XamDataGrid.SuppressedEvents>
<DataPresenter:RoutedEventWrapper RoutedEvent="igEditors:ValueEditor.TextChanged" />
<DataPresenter:RoutedEventWrapper RoutedEvent="igEditors:ValueEditor.ValueChanged" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.AssigningFieldLayoutToItem" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.CellActivating" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.CellActivated" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.CellDeactivating" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.DataValueChanged" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.ExecutingCommand" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.ExecutedCommand" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.InitializeCellValuePresenter" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.InitializeRecord" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.RecordActivating" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.RecordActivated" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.RecordDeactivating" />
<DataPresenter:RoutedEventWrapper RoutedEvent="DataPresenter:DataPresenterBase.RecordsInViewChanged" />
</DataPresenter:XamDataGrid.SuppressedEvents>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<cmd:EventToCommand Command="{Binding MouseDoubleClickCommand,
Mode=OneWay}"
PassEventArgsToCommand="True"/>
</i:EventTrigger>
<i:EventTrigger EventName="Loaded">
<cmd:LoadGridLayoutAction />
</i:Interaction.Triggers>
<DataPresenter:XamDataGrid.FieldSettings>
<DataPresenter:FieldSettings AllowRecordFiltering="True"
CellClickAction="SelectRecord"
AllowCellVirtualization="True"
AllowEdit="False" />
</DataPresenter:XamDataGrid.FieldSettings>
<DataPresenter:XamDataGrid.FieldLayoutSettings>
<DataPresenter:FieldLayoutSettings AutoGenerateFields="False"
HighlightAlternateRecords="True"
FixedFieldUIType="Splitter"
DataRecordSizingMode="Fixed"
AllowDelete="False"
AllowAddNew="False"
RecordSelectorExtent="30"
SelectionTypeRecord="Extended" />
</DataPresenter:XamDataGrid.FieldLayoutSettings>
<DataPresenter:XamDataGrid.FieldLayouts>
<DataPresenter:FieldLayout Key="DefaultLayout">
<DataPresenter:FieldLayout.FieldSettings>
<DataPresenter:FieldSettings
ExpandableFieldRecordExpansionMode="ExpandAlways"
/>
</DataPresenter:FieldLayout.FieldSettings>
<DataPresenter:FieldLayout.Fields>
<DataPresenter:Field Name="Children" Label="Deals" />
<DataPresenter:Field Name="IsInAction" Label="" FixedLocation="FixedToNearEdge" Width="17">
<DataPresenter:Field.Settings>
<DataPresenter:FieldSettings CellValuePresenterStyle="{StaticResource InProgressColumnStyle}" AllowRecordFiltering="False"/>
</DataPresenter:Field.Settings>
</DataPresenter:Field>
<DataPresenter:Field Name="IsExpiryEvent" Label="Expiring this week" ToolTip="Expiring this week" FixedLocation="FixedToNearEdge" Width="17" >
<DataPresenter:FieldSettings CellValuePresenterStyle="{StaticResource ExpiryEventColumnStyle}" AllowRecordFiltering="False" />
<DataPresenter:Field Name="IsBarrierEvent" Label="Barrier proximity" ToolTip="Barrier proximity" FixedLocation="FixedToNearEdge" Width="17">
<DataPresenter:FieldSettings CellValuePresenterStyle="{StaticResource BarrierEventColumnStyle}" AllowRecordFiltering="False"/>
<DataPresenter:Field Name="Region" Label="Rgn" Width="20" FixedLocation="FixedToNearEdge" >
<DataPresenter:Field.Settings >
<DataPresenter:FieldSettings CellValuePresenterStyle="{StaticResource FrozenColumnStyle}" />
<DataPresenter:Field Name="ClientName" Label="Client" Width="140" FixedLocation="FixedToNearEdge">
<DataPresenter:Field Name="UlMdSymbol" Label="Underlier" Width="55" FixedLocation="FixedToNearEdge">
<DataPresenter:Field Name="TradeCategory" Label="Category" Width="34" ToolTip="Trade Category" FixedLocation="FixedToNearEdge">
<!-- End of fixed columns -->
<DataPresenter:Field Name="BuySell" Label="B/S" Width="32" ToolTip="Buy/Sell">
<DataPresenter:FieldSettings CellValuePresenterStyle="{StaticResource CenterAlignedColumnStyle}" />
<DataPresenter:Field Name="SizeFormatted" Label="Size" Width="60">
<DataPresenter:FieldSettings CellValuePresenterStyle="{StaticResource RightAlignedColumnStyle}" />
<DataPresenter:Field Name="ExpiryFormatted" Label="Expiry" Width="66"/>
<DataPresenter:Field Name="PremiumCcyCd" Label="CCY" Width="30" />
<DataPresenter:Field Name="TheoValueFormatted" Label="Price" Width="50">
<DataPresenter:Field Name="ProductDescription" Label="Description" Width="160" />
<DataPresenter:Field Name="OTCMsCusip" Label="Cusip" Width="70" >
<DataPresenter:Field Name="OrderFiller" Label="Trading Acct" Width="64"/>
<DataPresenter:Field Name="OrderPlacer" Label="Cpty Acct" Width="64" />
<DataPresenter:Field Name="TradeDateFormatted" Label="Tr Date" ToolTip="Trade Date" Width="66"/>
<DataPresenter:Field Name="LongDescription" Label="Long Description" Width="160" ToolTip="Long Description" />
</DataPresenter:FieldLayout.Fields>
</DataPresenter:FieldLayout>
<DataPresenter:FieldSettings AllowRecordFiltering="False" />
<DataPresenter:Field Name="ProductType" Label="Product Type" Width="64"/>
<DataPresenter:Field Name="Market" Label="Market" Width="64"/>
<DataPresenter:Field Name="Description" Label="Description" Width="Auto"/>
<DataPresenter:Field Name="IssueId" Label="Issue Id" Width="86"/>
<DataPresenter:Field Name="MarketId" Label="Market Id" Width="84"/>
<DataPresenter:Field Name="MsCusip" Label="MS Cusip" Width="64"/>
<DataPresenter:Field Name="BloombergId" Label="BB Id" Width="64" ToolTip="Bloomberg Id"/>
<DataPresenter:Field Name="MdSymbol" Label="MD Symbol" Width="110"/>
<DataPresenter:Field Name="TradeSymbol" Label="Trade Symbol" Width="76"/>
<DataPresenter:Field Name="Ric" Label="RIC" Width="104"/>
<DataPresenter:Field Name="Sedol" Label="Sedol" Width="64"/>
<DataPresenter:Field Name="Isin" Label="ISIN" Width="75"/>
<DataPresenter:Field Name="Cusip" Label="Cusip" Width="76"/>
</DataPresenter:XamDataGrid.FieldLayouts>
</DataPresenter:XamDataGrid>
And this the style applied to the grid:
<Style x:Key="DefaultInfragisticsGridStyle" TargetType="{x:Type DataPresenter:XamDataGrid}">
<Setter Property="Height" Value="Auto" />
<Setter Property="Theme" Value="Onyx" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="9.5" />
<Setter Property="GroupByAreaLocation" Value="AboveDataArea" />
<Setter Property="IsGroupByAreaExpanded" Value="False" />
<Setter Property="AutoFit" Value="False" />
<Setter Property="RecordLoadMode" Value="LoadOnDemand"/>
<Setter Property="RecordContainerGenerationMode" Value="Recycle"/>
<Setter Property="CellContainerGenerationMode" Value="Recycle"/>
<Setter Property="ScrollingMode" Value="DeferredWithScrollTips"/>
<Setter Property="DataSource" Value="{Binding View}"/>
<Setter Property="ContextMenu" Value="{StaticResource gridContextMenu}"/>
<Setter Property="infraControls:XamDataGridItemsHelper.SelectedDataItemsEnabled" Value="True"/>
<Setter Property="infraControls:XamDataGridItemsHelper.SelectedDataItems" Value="{Binding SelectedRowsInDataPresenter, Mode=TwoWay}"/>
Sorted, please forget about this
Can you please tell how you fixed it? I am facing similar issue.
Thanks,
Naveen
HI Naveen,
Can you provide a small sample that replicates this issue?
Sincerely, Matt Developer Support Engineer