i have a dxg:GridControl in which i have dxg:GridColumn and on every row there is a Display and Edit template like below
<dxg:GridControl>
<dxg:GridControl.Columns>
<dxg:GridColumn Width="101"
AllowBestFit="True"
AllowColumnFiltering="True"
AllowSorting="False"
FieldName="Tolerance"
Header="Tolerance Type"
ReadOnly="{Binding IsReadOnly}">
<dxg:GridColumn.EditTemplate>
<ControlTemplate>
<dxe:ComboBoxEdit
x:Name="PART_Editor"
Width="100"
ItemsSource="{Binding Path=DataContext.ToleranceTypeCollection,
RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type UserControl}}}"
SelectedItem="{Binding RowData.Row.Tolerance}"
DisplayMember="ToleranceType"
FilterCondition="Contains"
ImmediatePopup="True"
IncrementalFiltering="True"
IsTextEditable="False"
ValueMember="ToleranceTypeId"
ShowSizeGrip="True"
TextWrapping="WrapWithOverflow"
Style="{DynamicResource DXEComboBoxEditStyle}" />
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=DataContext.ToleranceTypeCollection.Count, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="0">
<Setter TargetName="PART_Editor" Property="IsEnabled" Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding DataContext.IsReadOnly, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="True">
<Setter TargetName="PART_Editor" Property="IsEnabled" Value="False" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</dxg:GridColumn.EditTemplate>
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Text="{Binding RowData.Row.Tolerance.ToleranceType}" />
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
</dxg:GridControl>
the values are coming well on the Display template but while clicking on Cell, the control is changing to dxe:ComboBoxEdit but it is not automatically picking the saved value from List of values in drop down hence the value on Display templates's textbox is being lost after clicking somewhere else.
Using Dev Express v 18.1
Please help on the same Thank you