So in each record (row) what I am trying to do is either display a XamTextEditor or a XamComboEditor in Field 2 (column) based on the value of the Field 1 (column) in each record. The only way I have found to do this is to override the CellValuePresenter Style in the following manner. This creates the following problems that are only present in Field 2 (the field in which I am using my custom CellValuePresenterTemplate).
1) The IDataErrorInfo support I set in the parent XamDataGrid (via SupportDataErrorInfo="RecordsAndCells") and the custom error template I have defined (via <Style x:Key="{x:Static igDP:DataPresenterBase.DataErrorIconStyleKey}" TargetType="{x:Type Control}" > **** </Style > ) are both not applied to the igEditors in my CVP template
2) The controls that are displayed are seemingly only using thier edit templates because the XamTextEditors are not showing as a TextBlock when they are not in the selected cell.
I'm sure that these issues are happening because I'm creating my own CellValuePresenter template from scratch and not just editing the Infragistics CellValuePresenter that is provided. This being the case how would I go about modifying the existing CellValuePresenter style to get the functionality I want?
Below is the CVP
Style x:Key="DestinationSwitchField" TargetType="{x:Type igDP:CellValuePresenter}" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
<Grid x:Name="container">
<igEditors:XamTextEditor Visibility="{Binding Path=DataItem.DestinationATCapType.Description, Converter={StaticResource StrCmpToVisConverter}, ConverterParameter='State'}"
Value="{Binding Path=DataItem.Destination}"/>
<igEditors:XamTextEditor Visibility="{Binding Path=DataItem.DestinationATCapType.Description, Converter={StaticResource StrCmpToVisConverter}, ConverterParameter='Postal Code'}"
<igEditors:XamTextEditor EditTemplate="{StaticResource XamTextEditor_DestinationLocationEditTemplate}"
Visibility="{Binding Path=DataItem.DestinationATCapType.Description, Converter={StaticResource StrCmpToVisConverter}, ConverterParameter='Location'}"
<igEditors:XamTextEditor EditTemplate="{StaticResource XamTextEditor_DestinationCityEditTemplate}"
Visibility="{Binding Path=DataItem.DestinationATCapType.Description, Converter={StaticResource StrCmpToVisConverter}, ConverterParameter='City'}"
<igEditors:XamComboEditor Visibility="{Binding Path=DataItem.DestinationATCapType.Description, Converter={StaticResource StrCmpToVisConverter}, ConverterParameter='Region'}"
SelectedItem="{Binding Path=DataItem.DestinationRegion}"
ItemsSource="{Binding Path=DataContext.PartyAutoTenderRegionList, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl
}}}"
DisplayMemberPath="Name"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Hello Chad,
I have modified the sample further, so now it has the functionality you.
Hope this helps you.
Thank you for giving me updates Stefan
I have asked our dev team to take a look at this issue and as soon as I get answer from them I will update you further.
Once again thank you for your patience.
No problem Stefan, thanks for the update.
I apologize for the late reply, but I will need more time to investigate your issue, so I will update you by the end of today or tomorrow morning.
Thank you for your patience.