Hi Nikola,
Probably, the CellEditor’s EditTemplate of the column manually created was not properly implemented or set. Please note that the Xceed DatagridControl will use default editor based on the field’s DataType if available.
Implementation examples are available on the Included Editors available on the folder: C:\Xceed Samples\Xceed DataGrid for WPF v3.6\CSharp\IncludedEditors.
For example:
…
<xcdg:Column FieldName="Category"
Title="ComboBox"
Width="125"
CellContentTemplate="{StaticResource categoryCellDataTemplate}"
CellEditor="{StaticResource categoryEditor}"
Visible="{Binding Source={x:Static local:MainPageParams.Singleton},Path=ComboBoxColumnsVisible}" />
…
With
<xcdg:CellEditor x:Key="categoryEditor">
<xcdg:CellEditor.EditTemplate>
<DataTemplate>
<ComboBox BorderThickness="0"
VerticalContentAlignment="Top"
MinHeight="22"
ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType=local:MainPage},Path=Departments}"
SelectedValue="{xcdg:CellEditorBinding}"
FocusVisualStyle="{x:Null}">
<ComboBox.Resources>
<Style TargetType="Popup">
<Setter Property="TextElement.Foreground"
Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
</Style>
</ComboBox.Resources>
</ComboBox>
</DataTemplate>
</xcdg:CellEditor.EditTemplate>
<!-- Declare the wanted key gesture that will activate the ComboBox CellEditor. -->
<xcdg:CellEditor.ActivationGestures>
<xcdg:KeyActivationGesture SystemKey="Down"
Modifiers="Alt" />
<xcdg:KeyActivationGesture Key="Up"
Modifiers="Alt" />
<xcdg:KeyActivationGesture Key="F4" />
<xcdg:KeyActivationGesture Key="Space" />
</xcdg:CellEditor.ActivationGestures>
</xcdg:CellEditor>
Xceed - Software Developer and Technical Support