I am using a hierarchical XamDataGrid with a Template Field in the second level of the hierarchy. The Template Field is using the DisplayTemplate property and is set to a DynamicResource in our program. It was a static resource but it tends to display more often as a DynamicResource. What is happening is when the values are set to “All-All-All” through our DataTemplate the values will disappear to “ - - “ when you are scrolling. As you scroll around sometimes they come back. Sometimes they are there when you open the hierarchy, sometimes they are not. There is zero consistency to this. I did try to use RecordContainerGenerationMode="Preload". This made it so the values were never there. Also the tooltip on the template is always working.
This is a sample of our Template
<DataTemplate x:Key="FieldDisplayTemplate">
<TextBlock ToolTip="{StaticResource ToolTip}">
<Run>
<Run.Style>
<Style TargetType="Run">
<Setter Property="Text"
Value="{Binding AppliedCode.Code, Mode=OneWay}" />
<Setter Property="FontStyle"
Value="Italic" />
<Style.Triggers>
<!-- Code Admin areas - null = All -->
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding CodeOverrideType, FallbackValue={x:Null}}"
Value="{x:Null}" />
<Condition Binding="{Binding Code, FallbackValue={x:Null}}"
<Condition Binding="{Binding AppliedCode, FallbackValue={x:Null}}"
</MultiDataTrigger.Conditions>
Value="{x:Static LocalResources:Label.All}" />
</MultiDataTrigger>
<DataTrigger Binding="{Binding CodeOverrideType, FallbackValue={x:Null}}"
Value="{x:Null}">
Value="Normal" />
</DataTrigger>
</Style.Triggers>
</Style>
</Run.Style>
</Run>
-
Value="{Binding AppliedCode2.Code, Mode=OneWay}" />
<Condition Binding="{Binding CodeOverrideType2, FallbackValue={x:Null}}"
<Condition Binding="{Binding Code2, FallbackValue={x:Null}}"
<Condition Binding="{Binding AppliedCode2, FallbackValue={x:Null}}"
<DataTrigger Binding="{Binding CodeOverrideType2, FallbackValue={x:Null}}"
Value="{Binding AppliedCode3.Code, Mode=OneWay}" />
<Condition Binding="{Binding CodeOverrideType3, FallbackValue={x:Null}}"
<Condition Binding="{Binding Code3, FallbackValue={x:Null}}"
<Condition Binding="{Binding AppliedCode3, FallbackValue={x:Null}}"
<DataTrigger Binding="{Binding ServiceClassCodeOverrideType, FallbackValue={x:Null}}"
</TextBlock>
</DataTemplate>
The TemplateField of our grid looks like this:
<igWPF:TemplateField Name="CodeGroup"
Label="{Binding Source={x:Static LocalResources:Label.CodeGroup}, Converter={StaticResource AllCapsConverter}, Mode=OneWay}"
Width="Auto"
AlternateBinding="{Binding}"
DisplayTemplate="{DynamicResource FieldDisplayTemplate}"/>
Hello Laura,
Thank you for your post!
I have created a sample project that is based on the template that you have provided for your template field, but I can't seem to reproduce this issue you are seeing. I have attached this sample project for you to test on your machine. My tests were made using version 15.1.20151.2055 in Infragistics for WPF 2015.1. Is this the same version you are using?
When I run the project that I have attached, I am seeing that the values for the "All-All-All" hierarchical child column are consistently there, and they do not disappear after scrolling. If this is the case for you as well, would it be possible for you to please modify the project I sent or provide a sample project of your own that demonstrates this issue that you are seeing?
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support